Subversion Repositories SmartDukaan

Rev

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

Rev 15344 Rev 15610
Line 20... Line 20...
20
 
20
 
21
(options, args) = parser.parse_args()
21
(options, args) = parser.parse_args()
22
 
22
 
23
mc = MemCache(options.mongoHost)
23
mc = MemCache(options.mongoHost)
24
 
24
 
-
 
25
ignoreItems = [4490,4491]
-
 
26
 
25
def get_mongo_connection(host=options.mongoHost, port=27017):
27
def get_mongo_connection(host=options.mongoHost, port=27017):
26
    global con
28
    global con
27
    if con is None:
29
    if con is None:
28
        print "Establishing connection %s host and port %d" %(host,port)
30
        print "Establishing connection %s host and port %d" %(host,port)
29
        try:
31
        try:
Line 82... Line 84...
82
    retryCount = 0
84
    retryCount = 0
83
    if data['identifier'] is None or len(data['identifier'].strip())==0:
85
    if data['identifier'] is None or len(data['identifier'].strip())==0:
84
        print "returning in valid identifier"
86
        print "returning in valid identifier"
85
        return
87
        return
86
    
88
    
-
 
89
    if data['_id'] in ignoreItems:
-
 
90
        print "Ignored items returning for %d"%(data['_id'])
-
 
91
        return 
-
 
92
        
87
    try:
93
    try:
88
        if data['priceUpdatedOn'] > to_java_date(datetime.now() - timedelta(minutes=5)):
94
        if data['priceUpdatedOn'] > to_java_date(datetime.now() - timedelta(minutes=5)):
89
            print "sku id is already updated %d" %(data['_id']) 
95
            print "sku id is already updated %d" %(data['_id']) 
90
            return
96
            return
91
    except:
97
    except: