Administrator
2023-09-25 b696ad64d69705c03d43406f1d1d2010b16923bb
huaxin_client/command_manager.py
@@ -11,7 +11,7 @@
from huaxin_client import socket_util
from huaxin_client.client_network import SendResponseSkManager
from log_module import async_log_util
from log_module.log import logger_local_huaxin_trade_debug, logger_trade
from log_module.log import logger_local_huaxin_trade_debug, logger_trade, logger_local_huaxin_contact_debug
MSG_TYPE_HEART = "heart"
# 命令信息
@@ -82,6 +82,7 @@
    @classmethod
    def process_command(cls, _type, client_id, result_json, sk=None):
        async_log_util.info(logger_local_huaxin_contact_debug, f"process_command: {result_json}")
        # 查看是否是设置L2的代码
        if _type == CLIENT_TYPE_CMD_L2:
            cls.pipe_l2.send(
@@ -117,9 +118,9 @@
            elif _type == "test":
                cls.action_callback.OnTest(client_id, request_id, data, sk)
        except Exception as e:
            logger_local_huaxin_trade_debug.debug(f"process_command出错:{result_json}")
            logging.exception(e)
            logging.error(result_json)
            async_log_util.error(logger_local_huaxin_contact_debug, f"process_command出错: {result_json}")
            # logging.exception(e)
            # logging.error(result_json)
    @classmethod
    def run_process_command(cls, queue_strategy_trade: multiprocessing.Queue):
@@ -132,6 +133,7 @@
                    val = queue_strategy_trade.get()
                    if val:
                        _type = val["type"]
                        async_log_util.info(logger_local_huaxin_contact_debug, f"接受到信息: {_type}")
                        cls.process_command_thread_pool.submit(lambda: cls.process_command(_type, None, val))
                except Exception as e:
                    async_log_util.exception(logger_local_huaxin_trade_debug, e)