余尚辉 hace 3 días
padre
commit
ba99e688c8
Se han modificado 1 ficheros con 1 adiciones y 7 borrados
  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')))