瀏覽代碼

fix: 还原

余尚辉 20 小時之前
父節點
當前提交
ba99e688c8
共有 1 個文件被更改,包括 1 次插入7 次删除
  1. 1 7
      src/core/callcenter/esl/client.py

+ 1 - 7
src/core/callcenter/esl/client.py

@@ -107,13 +107,7 @@ class InboundClient:
         else:
             random_index = random.randint(0, len(self.executors) - 1) if self.executors else 0
         # print('choose_thread_pool_executor.index=', random_index, call_id, device_id, wdh_device_id)
-            # 获取执行器
-        executor = self.executors.get(random_index)
-        if executor is None:  # 如果未找到,打印日志并返回备用执行器
-            self.logger.error(f"Executor not found for index {random_index}.")
-            executor = concurrent.futures.ThreadPoolExecutor(max_workers=1)
-        return executor
-        # return self.executors.get(random_index)
+        return self.executors.get(random_index)
 
     def process_esl_event(self, e):
         # print(json.loads(e.serialize('json')))