Subversion Repositories SmartDukaan

Rev

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

Rev 12917 Rev 12918
Line 2918... Line 2918...
2918
    while (len(itemInfo)>0):
2918
    while (len(itemInfo)>0):
2919
        if len(itemInfo) >= 20:
2919
        if len(itemInfo) >= 20:
2920
            itemsToPopulate = 20
2920
            itemsToPopulate = 20
2921
        else:
2921
        else:
2922
            itemsToPopulate = len(itemInfo)
2922
            itemsToPopulate = len(itemInfo)
2923
        print "items to popluate"
-
 
2924
        print itemsToPopulate
-
 
2925
        exceptionList, negativeMargin, cheapest, amongCheapestAndCanCompete, canCompete, almostCompete, cantCompete = decideCategory(itemInfo[0:itemsToPopulate],timestamp)
2923
        exceptionList, negativeMargin, cheapest, amongCheapestAndCanCompete, canCompete, almostCompete, cantCompete = decideCategory(itemInfo[0:itemsToPopulate],timestamp)
2926
        itemInfo[0:itemsToPopulate] = []
2924
        itemInfo[0:itemsToPopulate] = []
2927
        commitExceptionList(exceptionList,timestamp,options.runType)
2925
        commitExceptionList(exceptionList,timestamp,options.runType)
2928
        commitNegativeMargin(negativeMargin,timestamp,options.runType)
2926
        commitNegativeMargin(negativeMargin,timestamp,options.runType)
2929
        commitCheapest(cheapest,timestamp,options.runType)
2927
        commitCheapest(cheapest,timestamp,options.runType)
Line 2934... Line 2932...
2934
        exceptionList[:], negativeMargin[:], cheapest[:], amongCheapestAndCanCompete[:], canCompete[:], almostCompete[:], cantCompete[:] =[],[],[],[],[],[],[]
2932
        exceptionList[:], negativeMargin[:], cheapest[:], amongCheapestAndCanCompete[:], canCompete[:], almostCompete[:], cantCompete[:] =[],[],[],[],[],[],[]
2935
    autoDecreaseItems = fetchItemsForAutoDecrease(timestamp)
2933
    autoDecreaseItems = fetchItemsForAutoDecrease(timestamp)
2936
    autoIncreaseItems = fetchItemsForAutoIncrease(timestamp)
2934
    autoIncreaseItems = fetchItemsForAutoIncrease(timestamp)
2937
    previousAutoFav, nowAutoFav = markAutoFavourites(timestamp)
2935
    previousAutoFav, nowAutoFav = markAutoFavourites(timestamp)
2938
    writeReport(timestamp,autoDecreaseItems,autoIncreaseItems,previousAutoFav,nowAutoFav,options.runType)
2936
    writeReport(timestamp,autoDecreaseItems,autoIncreaseItems,previousAutoFav,nowAutoFav,options.runType)
2939
    print "send auto pricing email"
-
 
2940
    commitPricing(autoDecreaseItems,autoIncreaseItems)
2937
    commitPricing(autoDecreaseItems,autoIncreaseItems)
2941
    sendAutoPricingMail(autoDecreaseItems,autoIncreaseItems)
2938
    sendAutoPricingMail(autoDecreaseItems,autoIncreaseItems)
2942
    if options.runType == 'FULL-OTHER':
2939
    if options.runType == 'FULL-OTHER':
2943
        sendAlertForNegativeMargins(timestamp)
2940
        sendAlertForNegativeMargins(timestamp)
2944
        sendAlertForCantCompete(timestamp)
2941
        sendAlertForCantCompete(timestamp)