| Line 6486... |
Line 6486... |
| 6486 |
def get_min_created_timestamp_undelivered_orders_for_source(source):
|
6486 |
def get_min_created_timestamp_undelivered_orders_for_source(source):
|
| 6487 |
order = order = Order.query.filter(Order.source== source).filter(Order.delivery_timestamp == None).filter(Order.status == OrderStatus.SHIPPED_FROM_WH).limit(1).one()
|
6487 |
order = order = Order.query.filter(Order.source== source).filter(Order.delivery_timestamp == None).filter(Order.status == OrderStatus.SHIPPED_FROM_WH).limit(1).one()
|
| 6488 |
print to_java_date(order.created_timestamp)
|
6488 |
print to_java_date(order.created_timestamp)
|
| 6489 |
return to_java_date(order.created_timestamp)
|
6489 |
return to_java_date(order.created_timestamp)
|
| 6490 |
|
6490 |
|
| - |
|
6491 |
def is_private_deal_transaction(transaction_id):
|
| - |
|
6492 |
result = False
|
| - |
|
6493 |
transaction = Transaction.get_by(id = transaction_id)
|
| - |
|
6494 |
if transaction:
|
| - |
|
6495 |
if transaction.coupon_code is None or transaction.coupon_code=="":
|
| - |
|
6496 |
return result
|
| - |
|
6497 |
else:
|
| - |
|
6498 |
promotion_client = PromotionClient().get_client()
|
| - |
|
6499 |
coupon = promotion_client.getCoupon(transaction.coupon_code)
|
| - |
|
6500 |
if(coupon.promotion.ruleExecutionSrc=='rule_private_deals'):
|
| - |
|
6501 |
result = True
|
| - |
|
6502 |
return False
|
| - |
|
6503 |
|
| 6491 |
def update_snapdeal_orders_status(orders):
|
6504 |
def update_snapdeal_orders_status(orders):
|
| 6492 |
for statusString, orderList in orders.iteritems():
|
6505 |
for statusString, orderList in orders.iteritems():
|
| 6493 |
if statusString == "Cancelled":
|
6506 |
if statusString == "Cancelled":
|
| 6494 |
try:
|
6507 |
try:
|
| 6495 |
for cancel_order in orderList:
|
6508 |
for cancel_order in orderList:
|