| Line 120... |
Line 120... |
| 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:
|
123 |
if closed:
|
| 124 |
print "Closed", {"orderId":merchantOrder.get("orderId")}, {"closed":True}
|
124 |
print "Closed", {"orderId":merchantOrder.get("orderId")}, {"closed":True}
|
| 125 |
bulk.find({"orderId":merchantOrder.get("orderId")}).update({"$set":{"closed":True, "parseError":True}})
|
125 |
bulk.find({"orderId":merchantOrder.get("orderId")}).update({"$set":{"closed":True, "parseError":False}})
|
| 126 |
result = bulk.execute()
|
126 |
result = bulk.execute()
|
| 127 |
tprint(result)
|
127 |
tprint(result)
|
| 128 |
except:
|
128 |
except:
|
| 129 |
tprint("Could not update " + str(merchantOrder['orderId']))
|
129 |
tprint("Could not update " + str(merchantOrder['orderId']))
|
| 130 |
self.db.merchantOrder.update({"orderId":merchantOrder['orderId']}, {"$set":{"parseError":True}})
|
130 |
self.db.merchantOrder.update({"orderId":merchantOrder['orderId']}, {"$set":{"parseError":True}})
|