Subversion Repositories SmartDukaan

Rev

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

Rev 13971 Rev 13975
Line 36... Line 36...
36
        try:
36
        try:
37
            if data['identifier'] is None or len(data['identifier'].strip())==0:
37
            if data['identifier'] is None or len(data['identifier'].strip())==0:
38
                return {}
38
                return {}
39
            
39
            
40
            try:
40
            try:
41
                if data['updatedOn'] > to_java_date(now - timedelta(minutes=5)):
41
                if data['priceUpdatedOn'] > to_java_date(now - timedelta(minutes=5)):
42
                    print "sku id is already updated",data['_id'] 
42
                    print "sku id is already updated",data['_id'] 
43
                    return {'_id':data['_id'],'available_price':data['available_price'],'in_stock':data['in_stock'],'source_id':1,'source_product_name':data['source_product_name'],'marketPlaceUrl':data['marketPlaceUrl'],'thumbnail':data['thumbnail']}
43
                    return {'_id':data['_id'],'available_price':data['available_price'],'in_stock':data['in_stock'],'source_id':1,'source_product_name':data['source_product_name'],'marketPlaceUrl':data['marketPlaceUrl'],'thumbnail':data['thumbnail']}
44
            except:
44
            except:
45
                pass
45
                pass
46
            
46
            
Line 73... Line 73...
73
        try:
73
        try:
74
            if data['identifier'] is None or len(data['identifier'].strip())==0:
74
            if data['identifier'] is None or len(data['identifier'].strip())==0:
75
                return {}
75
                return {}
76
            
76
            
77
            try:
77
            try:
78
                if data['updatedOn'] > to_java_date(now - timedelta(minutes=5)):
78
                if data['priceUpdatedOn'] > to_java_date(now - timedelta(minutes=5)):
79
                    print "sku id is already updated",data['_id']
79
                    print "sku id is already updated",data['_id']
80
                    return {'_id':data['_id'],'available_price':data['available_price'],'in_stock':data['in_stock'],'source_id':3,'source_product_name':data['source_product_name'],'marketPlaceUrl':data['marketPlaceUrl'],'thumbnail':data['thumbnail']}
80
                    return {'_id':data['_id'],'available_price':data['available_price'],'in_stock':data['in_stock'],'source_id':3,'source_product_name':data['source_product_name'],'marketPlaceUrl':data['marketPlaceUrl'],'thumbnail':data['thumbnail']}
81
                
81
                
82
            except Exception as e:
82
            except Exception as e:
83
                print "Exception snapdeal"
83
                print "Exception snapdeal"
Line 123... Line 123...
123
        try:
123
        try:
124
            if data['identifier'] is None or len(data['identifier'].strip())==0:
124
            if data['identifier'] is None or len(data['identifier'].strip())==0:
125
                return {}
125
                return {}
126
            
126
            
127
            try:
127
            try:
128
                if data['updatedOn'] > to_java_date(now - timedelta(minutes=5)):
128
                if data['priceUpdatedOn'] > to_java_date(now - timedelta(minutes=5)):
129
                    print "sku id is already updated",data['_id']
129
                    print "sku id is already updated",data['_id']
130
                    return {'_id':data['_id'],'available_price':data['available_price'],'in_stock':data['in_stock'],'source_id':2,'source_product_name':data['source_product_name'],'marketPlaceUrl':data['marketPlaceUrl'],'thumbnail':data['thumbnail']} 
130
                    return {'_id':data['_id'],'available_price':data['available_price'],'in_stock':data['in_stock'],'source_id':2,'source_product_name':data['source_product_name'],'marketPlaceUrl':data['marketPlaceUrl'],'thumbnail':data['thumbnail']} 
131
            except:
131
            except:
132
                pass
132
                pass
133
            
133