Subversion Repositories SmartDukaan

Rev

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

Rev 17763 Rev 18189
Line 95... Line 95...
95
    """Fetch latest updated items across portals
95
    """Fetch latest updated items across portals
96
       and calculate max and min R-Nlc"""
96
       and calculate max and min R-Nlc"""
97
    offset= 0
97
    offset= 0
98
    while(True):
98
    while(True):
99
        print "Fetching records offset %d and limit %d" %(offset,300)
99
        print "Fetching records offset %d and limit %d" %(offset,300)
100
        topSkus = list(get_mongo_connection().Catalog.MasterData.find( {"$and":[{'updatedOn': { "$gt": to_java_date(now - timedelta(hours=4))} }, { 'source_id' : { "$in": SOURCE_MAP.values() } }] }).skip(offset).limit(300))
100
        topSkus = list(get_mongo_connection().Catalog.MasterData.find( {"$and":[{'updatedOn': { "$gt": to_java_date(now - timedelta(hours=1))} }, { 'source_id' : { "$in": SOURCE_MAP.values() } }] }).skip(offset).limit(300))
101
        if len((topSkus)) == 0:
101
        if len((topSkus)) == 0:
102
            break
102
            break
103
        #topSkus = collection.find( {'_id':664})
103
        #topSkus = collection.find( {'_id':664})
104
        for sku in topSkus:
104
        for sku in topSkus:
105
            """Fix this """
105
            """Fix this """