余尚辉 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')))