|
@@ -49,8 +49,8 @@ class InboundClient:
|
|
|
self.executors = {x: concurrent.futures.ThreadPoolExecutor(max_workers=1) 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)
|
|
|
- # self.delay_action_scheduler.start()
|
|
|
+ self.delay_action_scheduler.add_job(self.submit_delay_action, 'interval', seconds=1, max_instances=1)
|
|
|
+ self.delay_action_scheduler.start()
|
|
|
threading.Thread(target=self.start, args=()).start()
|
|
|
|
|
|
def submit_delay_action(self):
|
|
@@ -171,6 +171,7 @@ class InboundClient:
|
|
|
self.cache.add_delay_message(DelayActionEnum.CALL_TIMEOUT_DECR, delay_action, timeouts=20)
|
|
|
self.cache.add_call_info(call_info)
|
|
|
self.hangup_call(call_id, device_id, CallCause.CALL_TIMEOUT)
|
|
|
+ print("人工外呼,呼叫超时,用户未接通会走这", flush=True)
|
|
|
|
|
|
def exec_when_play_timeout(self, call_id):
|
|
|
call_info = self.cache.get_call_info(call_id)
|