余尚辉 20 часов назад
Родитель
Сommit
6d58a9157f
1 измененных файлов с 7 добавлено и 1 удалено
  1. 7 1
      src/core/callcenter/esl/client.py

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

@@ -95,7 +95,13 @@ class InboundClient:
                     self.start()
                 else:
                     # threading.Thread(target=self.process_esl_event, args=(e,)).start()
-                    self.choose_thread_pool_executor(e).submit(self.process_esl_event, e)
+                    # self.choose_thread_pool_executor(e).submit(self.process_esl_event, e)
+                    try:
+                        executor = self.choose_thread_pool_executor(e)
+                        print("Executor obtained:", executor)
+                        executor.submit(self.process_esl_event, e)
+                    except Exception as ex:
+                        print(f"Error occurred while submitting task: {ex}")
 
     def choose_thread_pool_executor(self, e):
         call_id = EslEventUtil.getCallId(e)