Subversion Repositories SmartDukaan

Rev

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

Rev 13931 Rev 13974
Line 35... Line 35...
35
    l = []
35
    l = []
36
    items = get_mongo_connection().Catalog.MasterData.find({'source_id' : { "$in": SOURCE_MAP.values() } })
36
    items = get_mongo_connection().Catalog.MasterData.find({'source_id' : { "$in": SOURCE_MAP.values() } })
37
    print items.count()
37
    print items.count()
38
    for item in items:
38
    for item in items:
39
        title = xstr(item['brand'])+" "+xstr(item['model_name'])
39
        title = xstr(item['brand'])+" "+xstr(item['model_name'])
40
        s_info = __SkuInfo(str(item['_id']),int(item['skuBundleId']),str(item['brand']),str(item['model_name']),str(item['source_product_name']),int(item['category_id']),categoryMap.get(item['category_id']),float(item['available_price']),float(item['mrp']),item['in_stock'], \
40
        s_info = __SkuInfo(str(item['_id']),int(item['skuBundleId']),(item['brand']),(item['model_name']),(item['source_product_name']),int(item['category_id']),categoryMap.get(item['category_id']),float(item['available_price']),float(item['mrp']),item['in_stock'], \
41
                        int(item['source_id']),str(item['source']),title,str(item['thumbnail']), long(item['updatedOn']))
41
                        int(item['source_id']),(item['source']),title,(item['thumbnail']), long(item['updatedOn']))
42
        l.append(s_info.__dict__)
42
        l.append(s_info.__dict__)
43
    solr.add(l)
43
    solr.add(l)
44
 
44
 
45
def get_mongo_connection(host='localhost', port=27017):
45
def get_mongo_connection(host='localhost', port=27017):
46
    global con
46
    global con