Subversion Repositories SmartDukaan

Rev

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

Rev 16184 Rev 16190
Line 380... Line 380...
380
def resetRanks():
380
def resetRanks():
381
    get_mongo_connection().Catalog.MasterData.update({'rank':{'$gt':0},'source_id':5},{'$set' : {'rank':0,'updatedOn':to_java_date(now)}}, multi=True)
381
    get_mongo_connection().Catalog.MasterData.update({'rank':{'$gt':0},'source_id':5},{'$set' : {'rank':0,'updatedOn':to_java_date(now)}}, multi=True)
382
 
382
 
383
def main():
383
def main():
384
    if options.reset == 'True':
384
    if options.reset == 'True':
385
        time.sleep(4)
-
 
386
        print "Resetting ranks"
-
 
387
        resetRanks()
385
        resetRanks()
388
    scrapeBestSellers()
386
    scrapeBestSellers()
389
    if len(bundledProducts)>0 or len(exceptionList) > 0:
387
    if len(bundledProducts)>0 or len(exceptionList) > 0:
390
        sendMail()
388
        sendMail()
-
 
389
    else:
-
 
390
        "print nothing to send"
391
        
391
        
392
if __name__=='__main__':
392
if __name__=='__main__':
393
    main()
393
    main()
394
394