producer debugging
[mir.git] / source / mircoders / producer / ProducerStartPage.java
index 4f9b9fd..8ae3e5b 100755 (executable)
@@ -35,39 +35,26 @@ public class ProducerStartPage extends Producer {
   public void handle(PrintWriter htmlout, EntityUsers user, boolean force,boolean sync)
     throws StorageObjectException, ModuleException
   {
+    long    startTime = System.currentTimeMillis();
     printHTML(htmlout, "Producer.StartPage: started");
-    long                sessionConnectTime = 0;
-    long                startTime = (new java.util.Date()).getTime();
-    String              nowWebdbDate = StringUtil.date2webdbDate(new GregorianCalendar());
-    EntityList          entityList;
-
-    // get the newswire
-    entityList = contentModule.getNewsWire(0,newsPerPage);
-    SimpleList newsWireList = HTMLTemplateProcessor.makeSimpleList(entityList);
-    // get the startarticle
-    entityList = contentModule.getStartArticle();
-    SimpleList startItemList = HTMLTemplateProcessor.makeSimpleList(entityList);
-    // get the features
-    entityList = contentModule.getFeatures(0,itemsPerPage);
-    SimpleList featureList = HTMLTemplateProcessor.makeSimpleList(entityList);
-
     SimpleHash startPageModel = new SimpleHash();
 
     // breaking news
     ModuleBreaking breakingModule = new ModuleBreaking(DatabaseBreaking.getInstance());
     startPageModel.put("breakingnews", breakingModule.getBreakingNews());
-
     startPageModel.put("topics", topicsModule.getTopicsList());
-    startPageModel.put("newswire", newsWireList);
-    startPageModel.put("startspecial", startItemList);
-    startPageModel.put("features", featureList);
+    startPageModel.put("newswire", contentModule.getNewsWire(0,newsPerPage));
+    startPageModel.put("startspecial", contentModule.getStartArticle());
+    startPageModel.put("features", contentModule.getFeatures(0,itemsPerPage));
 
+    /** @todo switch to compressed */
     produce(startPageTemplate, producerDocRoot + "/index.shtml", startPageModel, htmlout);
 
-    // Finish
-    sessionConnectTime = new java.util.Date().getTime() - startTime;
-    logHTML(htmlout, "Producer.Startpage finished: " + sessionConnectTime + " ms.");
+    // finished
+    logHTMLFinish(htmlout, "Startpage", 1, startTime, System.currentTimeMillis());
+
     if(sync==true){
+      logHTML(htmlout, "Producer.Startpage: rsyncing...");
       Helper.rsync();
       logHTML(htmlout, "Producer.Startpage: rsync done");
     }