Subversion Repositories SmartDukaan

Rev

Rev 19593 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 19593 Rev 19650
Line 62... Line 62...
62
    utc_end =  to_java_date(datetime.utcfromtimestamp((end)/1000))
62
    utc_end =  to_java_date(datetime.utcfromtimestamp((end)/1000))
63
    query = "select * from events where label='click' and time >='"+str(utc_start)+"' and time < '"+str(utc_end)+"' ALLOW FILTERING"
63
    query = "select * from events where label='click' and time >='"+str(utc_start)+"' and time < '"+str(utc_end)+"' ALLOW FILTERING"
64
    print query
64
    print query
65
    result = session_cassandra.execute(query)
65
    result = session_cassandra.execute(query)
66
    for i in result:
66
    for i in result:
-
 
67
        try:
67
        sku = int((i.properties)['sku'])
68
            sku = int((i.properties)['sku'])
-
 
69
        except:
-
 
70
            continue
68
        master = get_mongo_connection(host=dtr_host).Catalog.MasterData.find_one({'_id':sku})
71
        master = get_mongo_connection(host=dtr_host).Catalog.MasterData.find_one({'_id':sku})
69
        if master is None:
72
        if master is None:
70
            continue
73
            continue
71
        bundleId = master['skuBundleId']
74
        bundleId = master['skuBundleId']
72
        if bundleMap.has_key(bundleId):
75
        if bundleMap.has_key(bundleId):