Subversion Repositories SmartDukaan

Rev

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

Rev 15266 Rev 15273
Line 360... Line 360...
360
    try:
360
    try:
361
        thread = threading.Thread(target=recomputeDeal, args = (item,))
361
        thread = threading.Thread(target=recomputeDeal, args = (item,))
362
        thread.daemon = True
362
        thread.daemon = True
363
        thread.start()    
363
        thread.start()    
364
    except:
364
    except:
-
 
365
        print traceback.print_exc()
365
        print "Unable to compute deal for ",skuBundleId
366
        print "Unable to compute deal for ",skuBundleId
366
    return temp
367
    return temp
367
 
368
 
368
def getLatestPriceById(id):
369
def getLatestPriceById(id):
369
    item = list(get_mongo_connection().Catalog.MasterData.find({'_id':id}))
370
    item = list(get_mongo_connection().Catalog.MasterData.find({'_id':id}))
Line 398... Line 399...
398
        print cashBackEx
399
        print cashBackEx
399
        print "Error calculating cashback."
400
        print "Error calculating cashback."
400
        info['cash_back_type'] = 0
401
        info['cash_back_type'] = 0
401
        info['cash_back'] = 0
402
        info['cash_back'] = 0
402
    try:
403
    try:
403
        thread = threading.Thread(target=recomputeDeal, args = (item[0]))
404
        thread = threading.Thread(target=recomputeDeal, args = (item[0],))
404
        thread.daemon = True
405
        thread.daemon = True
405
        thread.start()    
406
        thread.start()    
406
    except:
407
    except:
407
        print "Unable to compute deal for ",item[0]['skuBundleId']
408
        print "Unable to compute deal for ",item[0]['skuBundleId']
408
    return info
409
    return info