From 09ca670240a660b81d8dbed4c54efec96e99e811 Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期二, 12 九月 2023 11:14:41 +0800 Subject: [PATCH] 下单日志优化 --- huaxin_client/command_manager.py | 21 ++++++++++++--------- 1 files changed, 12 insertions(+), 9 deletions(-) diff --git a/huaxin_client/command_manager.py b/huaxin_client/command_manager.py index 5c846d9..aec509d 100644 --- a/huaxin_client/command_manager.py +++ b/huaxin_client/command_manager.py @@ -9,7 +9,8 @@ from huaxin_client import socket_util from huaxin_client.client_network import SendResponseSkManager -from log_module.log import logger_local_huaxin_trade_debug +from log_module import async_log_util +from log_module.log import logger_local_huaxin_trade_debug, logger_trade MSG_TYPE_HEART = "heart" # 鍛戒护淇℃伅 @@ -87,19 +88,21 @@ try: data = result_json["data"] - print("鎺ユ敹鍐呭", result_json) request_id = result_json.get('request_id') - if not socket_util.is_client_params_sign_right(result_json): - print("绛惧悕閿欒") - # 绛惧悕鍑洪敊 - SendResponseSkManager.send_error_response(_type, request_id, client_id, - {"code": -1, "msg": "绛惧悕閿欒"}) - return + # 鏆傛椂鍙栨秷绛惧悕 + # if not socket_util.is_client_params_sign_right(result_json): + # print("绛惧悕閿欒") + # # 绛惧悕鍑洪敊 + # SendResponseSkManager.send_error_response(_type, request_id, client_id, + # {"code": -1, "msg": "绛惧悕閿欒"}) + # return if _type == CLIENT_TYPE_TRADE: # 浜ゆ槗 ctype = data["trade_type"] + async_log_util.info(logger_trade, f"浜ゆ槗寮�濮�") cls.action_callback.OnTrade(client_id, request_id, sk, ctype, data) + async_log_util.info(logger_trade, f"浜ゆ槗缁撴潫") elif _type == CLIENT_TYPE_MONEY: cls.action_callback.OnMoney(client_id, request_id, sk) elif _type == CLIENT_TYPE_DEAL_LIST: @@ -127,7 +130,7 @@ val = pipe_strategy.recv() if val: val = json.loads(val) - print("run_process_command", val) + # print("run_process_command", val) _type = val["type"] threading.Thread(target=lambda: cls.process_command(_type, None, val), daemon=True).start() except Exception as e: -- Gitblit v1.8.0