|
@@ -680,7 +680,7 @@ class BotAgent:
|
|
_lock = True
|
|
_lock = True
|
|
if _lock:
|
|
if _lock:
|
|
self.logger.error("daviddebugger::play time greater than 60s, will restart")
|
|
self.logger.error("daviddebugger::play time greater than 60s, will restart")
|
|
- # self.restart()
|
|
|
|
|
|
+ self.restart()
|
|
return True
|
|
return True
|
|
|
|
|
|
_lock = self.cache.get_pjsua_thread_lock()
|
|
_lock = self.cache.get_pjsua_thread_lock()
|
|
@@ -806,17 +806,17 @@ class BotAgent:
|
|
self.is_stopping = True
|
|
self.is_stopping = True
|
|
time.sleep(1)
|
|
time.sleep(1)
|
|
self.logger.info("destroy, come in 11111")
|
|
self.logger.info("destroy, come in 11111")
|
|
- # try:
|
|
|
|
- # while not self.user_part_pool.empty():
|
|
|
|
- # self.user_part_pool.get_nowait()
|
|
|
|
- # except:
|
|
|
|
- # pass
|
|
|
|
|
|
+ try:
|
|
|
|
+ while not self.user_part_pool.empty():
|
|
|
|
+ self.user_part_pool.get_nowait()
|
|
|
|
+ except:
|
|
|
|
+ pass
|
|
self.logger.info("destroy, come in 22222")
|
|
self.logger.info("destroy, come in 22222")
|
|
- # self.call_players.clear()
|
|
|
|
- # self.accounts.clear()
|
|
|
|
- # self.calls.clear()
|
|
|
|
- # # Destroy the library
|
|
|
|
- # self.ep.libDestroy()
|
|
|
|
|
|
+ self.call_players.clear()
|
|
|
|
+ self.accounts.clear()
|
|
|
|
+ self.calls.clear()
|
|
|
|
+ # Destroy the library
|
|
|
|
+ self.ep.libDestroy()
|
|
time.sleep(1)
|
|
time.sleep(1)
|
|
self.logger.info("destroy, come in 33333")
|
|
self.logger.info("destroy, come in 33333")
|
|
|
|
|