Subversion Repositories SmartDukaan

Rev

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

Rev 17933 Rev 17986
Line 46... Line 46...
46
                #validItems.append({'_id':item.get('_id'),'catalog_item_id':long(item.get('identifier'))})
46
                #validItems.append({'_id':item.get('_id'),'catalog_item_id':long(item.get('identifier'))})
47
                bundleMap[long(item.get('identifier'))] = []
47
                bundleMap[long(item.get('identifier'))] = []
48
                
48
                
49
            else:
49
            else:
50
                print "Identifier not valid for %d"%(item.get('_id'))
50
                print "Identifier not valid for %d"%(item.get('_id'))
51
                print type(item.get('identifier'))
51
                print item.get('identifier')
52
        except Exception as e:
52
        except Exception as e:
53
            print e
53
            print e
54
            print "Exception Identifier not valid for %d"%(item.get('_id'))
54
            print "Exception Identifier not valid for %d"%(item.get('_id'))
55
    print bundleMap 
55
    print bundleMap 
56
                
56
                
Line 102... Line 102...
102
                item['maxQuantity'] = availability
102
                item['maxQuantity'] = availability
103
            else:
103
            else:
104
                item['maxQuantity'] = maxQuantity
104
                item['maxQuantity'] = maxQuantity
105
        temp = sorted(v, key = lambda x: (x['availability']),reverse=True)
105
        temp = sorted(v, key = lambda x: (x['availability']),reverse=True)
106
        mc = get_memcache_connection(host=options.mongoHost)
106
        mc = get_memcache_connection(host=options.mongoHost)
107
        mc.set(str("item_availability_"+str(k)), temp, 24*60*60)
107
        mc.set(str("item_availability_"+str(k)), temp, 60*60)
108
 
108
 
109
    
109
    
110
def fetchItemAvailablity():
110
def fetchItemAvailablity():
111
    global inventoryMap
111
    global inventoryMap
112
    try:
112
    try: