Explorar o código

fix: 添加错误日志

余尚辉 hai 20 horas
pai
achega
6d58a9157f
Modificáronse 1 ficheiros con 7 adicións e 1 borrados
  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)