From a68342e13d2f11eade054ff1ab3eb496ff266516 Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期五, 01 九月 2023 17:44:48 +0800 Subject: [PATCH] 真实下单位置校验 --- outside_api_command_manager.py | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/outside_api_command_manager.py b/outside_api_command_manager.py index 958a99c..9e7b63b 100644 --- a/outside_api_command_manager.py +++ b/outside_api_command_manager.py @@ -51,6 +51,8 @@ API_TYPE_CODE_ATRRIBUTE = "code_attribute" # 浠g爜灞炴�� API_TYPE_CODE_TRADE_STATE = "code_trade_state" # 浠g爜浜ゆ槗鐘舵�� API_TYPE_GET_ENV = "get_env" # 鑾峰彇鐜淇℃伅 +API_TYPE_SYNC_L1_TARGET_CODES = "sync_l1_subscript_codes" # 鍚屾L1闇�瑕佽闃呯殑浠g爜 +API_TYPE_SYSTEM_LOG = "system_log" # 绯荤粺鏃ュ織 class ActionCallback(object): @@ -86,6 +88,9 @@ pass def OnGetEnvInfo(self, client_id, request_id, data): + pass + + def OnSyncL2SubscriptCodes(self, client_id, request_id): pass @@ -181,6 +186,10 @@ cls.action_callback.OnGetCodeTradeState(client_id, request_id, data) elif content_type == API_TYPE_GET_ENV: cls.action_callback.OnGetEnvInfo(client_id, request_id, data) + elif content_type == API_TYPE_SYNC_L1_TARGET_CODES: + cls.action_callback.OnSyncL2SubscriptCodes(client_id, request_id) + elif content_type == API_TYPE_SYSTEM_LOG: + cls.action_callback.OnSystemLog(client_id, request_id, data) except Exception as e: logging.exception(e) pass @@ -208,12 +217,8 @@ while True: try: sk.send(socket_util.load_header(json.dumps({"type": "heart", "client_id": client_id}).encode('utf-8'))) - logger_debug.debug("蹇冭烦淇℃伅鍙戦�侊細{}",client_id) # print("蹇冭烦淇℃伅鍙戦�佹垚鍔�", client_id) except Exception as e: - logging.error("閿欒") - print("蹇冭烦淇℃伅鍙戦�佸け璐�", _type, client_id) - logging.exception(e) if _type == CLIENT_TYPE_TRADE: if client_id in cls.trade_client_dict: cls.trade_client_dict.pop(client_id) -- Gitblit v1.8.0