Subversion Repositories SmartDukaan

Rev

Rev 2743 | Rev 2793 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2743 Rev 2775
Line 272... Line 272...
272
 
272
 
273
        // Fetch comparison statistics only on sunday, else use the data stored in BDB
273
        // Fetch comparison statistics only on sunday, else use the data stored in BDB
274
        Calendar cal = Calendar.getInstance();
274
        Calendar cal = Calendar.getInstance();
275
        int dayOfWeek = cal.get(Calendar.DAY_OF_WEEK);
275
        int dayOfWeek = cal.get(Calendar.DAY_OF_WEEK);
276
        if(dayOfWeek == Calendar.SUNDAY){
276
        if(dayOfWeek == Calendar.SUNDAY){
-
 
277
    		long toDate = cal.getTime().getTime();
-
 
278
    		cal.add(Calendar.MONTH, -1);
-
 
279
    		long fromDate = cal.getTime().getTime();
277
        	ComparisonStatsFetcher csf = new ComparisonStatsFetcher();
280
        	ComparisonStatsFetcher csf = new ComparisonStatsFetcher();
278
        	csf.fetchAndStoreComparisonStats();
281
        	csf.fetchAndStoreComparisonStats(fromDate, toDate);
279
        }
282
        }
280
        
283
        
281
        items = client.getAllItemsByStatus(status.ACTIVE);
284
        items = client.getAllItemsByStatus(status.ACTIVE);
282
        items.addAll(client.getAllItemsByStatus(status.PAUSED));
285
        items.addAll(client.getAllItemsByStatus(status.PAUSED));
283
        items.addAll(client.getAllItemsByStatus(status.CONTENT_COMPLETE));
286
        items.addAll(client.getAllItemsByStatus(status.CONTENT_COMPLETE));