From beb099afd0440d23430d41ca72efad6a9a5b565b Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期三, 28 二月 2024 12:13:12 +0800 Subject: [PATCH] bug修改 --- huaxin_client/l2_data_manager.py | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/huaxin_client/l2_data_manager.py b/huaxin_client/l2_data_manager.py index ccddadf..e48d1de 100644 --- a/huaxin_client/l2_data_manager.py +++ b/huaxin_client/l2_data_manager.py @@ -158,6 +158,7 @@ def release_distributed_upload_queue(self, code): self.order_queue_distribute_manager.release_distribute_queue(code) self.transaction_queue_distribute_manager.release_distribute_queue(code) + self.l2_order_upload_protocol.release_distributed_upload_host(code) if code in self.temp_order_queue_dict: self.temp_order_queue_dict[code].clear() self.temp_order_queue_dict.pop(code) @@ -166,7 +167,7 @@ self.temp_transaction_queue_dict.pop(code) if code in self.upload_l2_data_task_dict: self.upload_l2_data_task_dict.pop(code) - self.l2_order_upload_protocol.release_distributed_upload_host(code) + def __upload_l2_data(self, code, _queue, datas): _queue.put_nowait((code, datas, time.time())) @@ -263,6 +264,8 @@ # 鍒嗛厤HOST def distribute_upload_host(self, code): + if code in self.code_socket_client_dict: + return self.rlock.acquire() try: host_info = self.__get_available_ipchost() @@ -272,6 +275,8 @@ self.rlock.release() def release_distributed_upload_host(self, code): + if code not in self.code_socket_client_dict: + return self.rlock.acquire() try: if code in self.code_socket_client_dict: -- Gitblit v1.8.0