DavidLiu 3 bulan lalu
induk
melakukan
bff36d7707
2 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 1 1
      src/core/callcenter/callback.py
  2. 1 1
      src/core/callcenter/esl/client.py

+ 1 - 1
src/core/callcenter/callback.py

@@ -21,7 +21,7 @@ class Callback(object):
         self.logger = app.logger
         self.cache = Cache(app)
         self.event_queue = queue.Queue()
-        self.executors = {x: concurrent.futures.ThreadPoolExecutor(max_workers=1) for x in range(thread_num)}
+        self.executors = {x: concurrent.futures.ThreadPoolExecutor(max_workers=1, thread_name_prefix="callback-event-pool") for x in range(thread_num)}
         self.agent_event_service = AgentEventService(app)
         threading.Thread(target=self.start).start()
 

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

@@ -50,7 +50,7 @@ class InboundClient:
         self.handler_table = self.scan_esl_event_handlers()
         self.default_event_handler = DefaultEslEventHandler(self, self.bot_agent)
         self.host, self.port, self.password = SERVE_HOST, '8021', '4918257983818884358'
-        self.executors = {x: concurrent.futures.ThreadPoolExecutor(max_workers=1) for x in range(self.thread_num)}
+        self.executors = {x: concurrent.futures.ThreadPoolExecutor(max_workers=1, thread_name_prefix="client-event-pool") for x in range(self.thread_num)}
         self.delay_action_executor = concurrent.futures.ThreadPoolExecutor(max_workers=5)
         self.delay_action_scheduler = BackgroundScheduler()
         self.delay_action_scheduler.add_job(self.submit_delay_action, 'interval', seconds=1, max_instances=1)