Administrator
2023-08-22 a933bf8e8e7f0c5a5131a95ed5d0f0b58bf9ac34
huaxin_client/command_manager.py
@@ -48,6 +48,10 @@
    def OnMoney(self, client_id, request_id):
        pass
    # 测试
    def OnTest(self, client_id, request_id, data):
        pass
class L2ActionCallback(object):
    # 监听L2数据
@@ -97,6 +101,8 @@
                cls.action_callback.OnDelegateList(client_id, request_id, can_cancel)
            elif _type == CLIENT_TYPE_POSITION_LIST:
                cls.action_callback.OnPositionList(client_id, request_id)
            elif _type == "test":
                cls.action_callback.OnTest(client_id, request_id, data)
        except Exception as e:
            logger_local_huaxin_trade_debug.debug(f"__process_command出错:{result_json}")
            logging.exception(e)
@@ -123,6 +129,7 @@
                        t1 = threading.Thread(target=lambda: cls.__process_command(_type, None, val), daemon=True)
                        t1.start()
            except Exception as e:
                logger_local_huaxin_trade_debug.exception(e)
                logging.exception(e)
    # 维护连接数的稳定