Subversion Repositories SmartDukaan

Rev

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

Rev 3464 Rev 3516
Line 301... Line 301...
301
        //Calculate comparison scores
301
        //Calculate comparison scores
302
        NewCMP cmp = new NewCMP(validEntities);
302
        NewCMP cmp = new NewCMP(validEntities);
303
        Map<Long, Map<Long, Double>> slideScoresByEntity = cmp.getSlideScores();
303
        Map<Long, Map<Long, Double>> slideScoresByEntity = cmp.getSlideScores();
304
        CreationUtils.storeSlideScores(slideScoresByEntity);
304
        CreationUtils.storeSlideScores(slideScoresByEntity);
305
 
305
 
306
        // Fetch comparison statistics only on sunday, else use the data stored in BDB
306
        // Fetch comparison statistics everyday and store them in BDB
307
        Calendar cal = Calendar.getInstance();
-
 
308
        //int dayOfWeek = cal.get(Calendar.DAY_OF_WEEK);
-
 
309
        //if(dayOfWeek == Calendar.SUNDAY){
-
 
310
    		long toDate = cal.getTime().getTime();
-
 
311
    		cal.add(Calendar.MONTH, -1);
-
 
312
    		long fromDate = cal.getTime().getTime();
-
 
313
        	ComparisonStatsFetcher csf = new ComparisonStatsFetcher();
307
        ComparisonStatsFetcher csf = new ComparisonStatsFetcher();
314
        	csf.fetchAndStoreComparisonStats(fromDate, toDate);
308
        csf.fetchAndStoreComparisonStats();
315
        //}
-
 
316
        	
309
        	
317
        // Upload catalod to Google App Engine.
310
        // Upload catalod to Google App Engine.
318
        if(GENERATION_TYPE.equals("ALL")) {
311
        if(GENERATION_TYPE.equals("ALL")) {
319
            List<Item> allItems = client.getAllItems(false);
312
            List<Item> allItems = client.getAllItems(false);
320
            allItems.addAll(client.getAllItems(true));
313
            allItems.addAll(client.getAllItems(true));