提交 c7aafbd0 authored 作者: 贺阳's avatar 贺阳

若该提单里已有对应的小包已有节点推送日志,则不再重新推送;还要推送前序节点

上级 4b2b1e33
...@@ -42,10 +42,11 @@ class Order_dispose(object): ...@@ -42,10 +42,11 @@ class Order_dispose(object):
bl_record = bl_obj.browse(bl_ids) bl_record = bl_obj.browse(bl_ids)
else: else:
bl_record = bl_obj.browse(data['id']) bl_record = bl_obj.browse(data['id'])
# utc_time = datetime.strptime(data['utc_time'], "%Y-%m-%d %H:%M:%S")
utc_time = data.get('utc_time') utc_time = data.get('utc_time')
user_login = data.get('user_login') user_login = data.get('user_login')
bl_record.mail_auto_push(utc_time, ship_packages, action_type, user_login, config.pda_db_user) pod_node_id = data.get('pod_node_id')
bl_record.mail_auto_push(utc_time, ship_packages, action_type, user_login, config.pda_db_user,
pod_node_id=pod_node_id)
except Exception as ex: except Exception as ex:
logging.error('mail_auto_push error:%s' % str(ex)) logging.error('mail_auto_push error:%s' % str(ex))
return res_data return res_data
...@@ -54,7 +55,7 @@ class Order_dispose(object): ...@@ -54,7 +55,7 @@ class Order_dispose(object):
try: try:
pool = redis.ConnectionPool(**config.redis_options) pool = redis.ConnectionPool(**config.redis_options)
r = redis.Redis(connection_pool=pool) r = redis.Redis(connection_pool=pool)
logging.info(u'redis连接成功') logging.info(u'redis connection success')
Order_dispose = Order_dispose() Order_dispose = Order_dispose()
while 1: while 1:
try: try:
...@@ -65,4 +66,4 @@ try: ...@@ -65,4 +66,4 @@ try:
logging.error(e) logging.error(e)
continue continue
except Exception as e: except Exception as e:
logging.error("登录失败:%s" % e) logging.error("login failed:%s" % e)
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论