From eb33b717023d9871bd74e6dce47a065228cffefc Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期四, 02 十一月 2023 11:23:09 +0800 Subject: [PATCH] L2进程与策略进程分开 --- huaxin_client/command_manager.py | 14 ++++---------- 1 files changed, 4 insertions(+), 10 deletions(-) diff --git a/huaxin_client/command_manager.py b/huaxin_client/command_manager.py index ab55c21..e95b1d2 100644 --- a/huaxin_client/command_manager.py +++ b/huaxin_client/command_manager.py @@ -58,7 +58,7 @@ class L2ActionCallback(object): # 鐩戝惉L2鏁版嵁 - def OnSetL2Position(self, client_id, request_id, codes_data): + def OnSetL2Position(self, codes_data): pass @@ -147,6 +147,7 @@ # L2鎸囦护绠$悊 class L2CommandManager: + action_callback = None @classmethod def init(cls, l2_action_callback): @@ -155,16 +156,9 @@ @classmethod def process_command(cls, _type, client_id, result_json): data = result_json["data"] - request_id = result_json["request_id"] - ctype = data["type"] - if not socket_util.is_client_params_sign_right(result_json): - # 绛惧悕鍑洪敊 - SendResponseSkManager.send_error_response(_type, request_id, client_id, - {"code": -1, "msg": "绛惧悕閿欒"}) - return - codes_data = data["data"] + ctype = result_json["type"] if ctype == CLIENT_TYPE_CMD_L2: - cls.action_callback.OnSetL2Position(client_id, request_id, codes_data) + cls.action_callback.OnSetL2Position(data) if __name__ == "__main__": -- Gitblit v1.8.0