Parcourir la source

fix: 添加错误日志

余尚辉 il y a 20 heures
Parent
commit
6d58a9157f
1 fichiers modifiés avec 7 ajouts et 1 suppressions
  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)