| Line 118... |
Line 118... |
| 118 |
newOrder['cashBackStatus'] = subOrder.get('cashBackStatus')
|
118 |
newOrder['cashBackStatus'] = subOrder.get('cashBackStatus')
|
| 119 |
updateMap = self.getUpdateMap(newOrder)
|
119 |
updateMap = self.getUpdateMap(newOrder)
|
| 120 |
print findMap, "\n", updateMap
|
120 |
print findMap, "\n", updateMap
|
| 121 |
bulk.find(findMap).update({'$set' : updateMap})
|
121 |
bulk.find(findMap).update({'$set' : updateMap})
|
| 122 |
closed = closed and newOrder['closed']
|
122 |
closed = closed and newOrder['closed']
|
| 123 |
if closed:
|
- |
|
| 124 |
print "Closed", {"orderId":merchantOrder.get("orderId")}, {"closed":True}
|
- |
|
| 125 |
bulk.find({"orderId":merchantOrder.get("orderId")}).update({"$set":{"closed":True, "parseError":False}})
|
123 |
bulk.find({"orderId":merchantOrder.get("orderId")}).update({"$set":{"closed":closed, "parseError":False}})
|
| 126 |
result = bulk.execute()
|
124 |
result = bulk.execute()
|
| 127 |
tprint(result)
|
125 |
tprint(result)
|
| 128 |
except:
|
126 |
except:
|
| 129 |
tprint("Could not update " + str(merchantOrder['orderId']))
|
127 |
tprint("Could not update " + str(merchantOrder['orderId']))
|
| 130 |
self.db.merchantOrder.update({"orderId":merchantOrder['orderId']}, {"$set":{"parseError":True}})
|
128 |
self.db.merchantOrder.update({"orderId":merchantOrder['orderId']}, {"$set":{"parseError":True}})
|