From 95e18d831b6e1e3509e24e1fe3eed9f1d0b70f6d Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期四, 31 七月 2025 14:13:27 +0800 Subject: [PATCH] 添加推送日志 --- socket_manager.py | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/socket_manager.py b/socket_manager.py index f92cebe..ae6847a 100644 --- a/socket_manager.py +++ b/socket_manager.py @@ -9,6 +9,7 @@ CLIENT_TYPE_COMMON = "common" CLIENT_TYPE_TRADE = "trade" CLIENT_TYPE_TRADE_SELL = "trade_sell" + CLIENT_TYPE_TRADE_LOW_SUCTION = "trade_low_suction" # 鍙浆鍊哄鎴风 CLIENT_TYPE_TRADE_CB = "trade_cb" @@ -18,7 +19,8 @@ @classmethod def add_client(cls, _type, rid, sk): - if _type == cls.CLIENT_TYPE_COMMON or _type == cls.CLIENT_TYPE_TRADE or _type == cls.CLIENT_TYPE_TRADE_SELL: + if _type in {cls.CLIENT_TYPE_COMMON, cls.CLIENT_TYPE_TRADE, cls.CLIENT_TYPE_TRADE_SELL, + cls.CLIENT_TYPE_TRADE_CB, cls.CLIENT_TYPE_TRADE_LOW_SUCTION}: # 浜ゆ槗鍒楄〃 if _type not in cls.socket_client_dict: cls.socket_client_dict[_type] = [] @@ -30,7 +32,8 @@ @classmethod def acquire_client(cls, _type): - if _type == cls.CLIENT_TYPE_COMMON or _type == cls.CLIENT_TYPE_TRADE or _type == cls.CLIENT_TYPE_TRADE_SELL: + if _type in {cls.CLIENT_TYPE_COMMON, cls.CLIENT_TYPE_TRADE, cls.CLIENT_TYPE_TRADE_SELL, + cls.CLIENT_TYPE_TRADE_CB, cls.CLIENT_TYPE_TRADE_LOW_SUCTION}: if _type in cls.socket_client_dict: # 鏍规嵁鎺掑簭娲昏穬鏃堕棿鎺掑簭 client_list = sorted(cls.socket_client_dict[_type], key=lambda x: cls.active_client_dict.get(x[0]) if x[ -- Gitblit v1.8.0