| Line 141... |
Line 141... |
| 141 |
bulk.find(findMap).update({'$set' : updateMap})
|
141 |
bulk.find(findMap).update({'$set' : updateMap})
|
| 142 |
bulk.find({'orderId': order['orderId']}).update({'$set':{'closed': closed, 'parseError':False}})
|
142 |
bulk.find({'orderId': order['orderId']}).update({'$set':{'closed': closed, 'parseError':False}})
|
| 143 |
bulk.execute()
|
143 |
bulk.execute()
|
| 144 |
except:
|
144 |
except:
|
| 145 |
self.db.merchantOrder.update({"orderId":order['orderId']}, {"$set":{"parseError":True}})
|
145 |
self.db.merchantOrder.update({"orderId":order['orderId']}, {"$set":{"parseError":True}})
|
| 146 |
tprint("Could not update " + str(order['orderId']))
|
146 |
tprint("Could not update " + str(order['orderId']) + ' for store ' + self.getName())
|
| 147 |
traceback.print_exc()
|
147 |
traceback.print_exc()
|
| 148 |
def scrapeAffiliate(self, startDate=None, endDate=None):
|
148 |
def scrapeAffiliate(self, startDate=None, endDate=None):
|
| 149 |
#get all yesterday's affiliate in pending or cancelled state and update to system
|
149 |
#get all yesterday's affiliate in pending or cancelled state and update to system
|
| 150 |
offers = []
|
150 |
offers = []
|
| 151 |
br = getBrowserObject()
|
151 |
br = getBrowserObject()
|