| Line 535... |
Line 535... |
| 535 |
result = Mongo.getDealRank(identifier, source_id, user_id)
|
535 |
result = Mongo.getDealRank(identifier, source_id, user_id)
|
| 536 |
json_docs = json.dumps(result, default=json_util.default)
|
536 |
json_docs = json.dumps(result, default=json_util.default)
|
| 537 |
resp.body = json_docs
|
537 |
resp.body = json_docs
|
| 538 |
|
538 |
|
| 539 |
|
539 |
|
| 540 |
|
- |
|
| - |
|
540 |
class OrderedOffers():
|
| - |
|
541 |
def on_get(self, req, resp, storeId, storeSku):
|
| - |
|
542 |
storeId = int(storeId)
|
| - |
|
543 |
return Mongo.getBundleBySourceSku(storeId, storeSku)
|
| 541 |
class RetailerDetail():
|
544 |
class RetailerDetail():
|
| 542 |
global RETAILER_DETAIL_CALL_COUNTER
|
545 |
global RETAILER_DETAIL_CALL_COUNTER
|
| 543 |
def getRetryRetailer(self,failback=True):
|
546 |
def getRetryRetailer(self,failback=True):
|
| 544 |
status = RETRY_MAP.get(self.callType)
|
547 |
status = RETRY_MAP.get(self.callType)
|
| 545 |
retailer = session.query(Retailers).filter_by(status=status).filter(Retailers.next_call_time<=datetime.now()).order_by(Retailers.call_priority).order_by(Retailers.next_call_time).with_lockmode("update").first()
|
548 |
retailer = session.query(Retailers).filter_by(status=status).filter(Retailers.next_call_time<=datetime.now()).order_by(Retailers.call_priority).order_by(Retailers.next_call_time).with_lockmode("update").first()
|