DavidLiu 3 months ago
parent
commit
9ca86d3c94
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/core/voip/bot.py

+ 1 - 1
src/core/voip/bot.py

@@ -532,6 +532,7 @@ class BotAgent:
             self.accounts[user_part] = acc
 
         while not self.is_stopping:
+            registry.BOT_AGENT_LIVES.set(self.user_part_pool.qsize())
             self.ep.libHandleEvents(100)
 
     def transfer(self, user_part, call_id, device_id, service_id='00000000000000000'):
@@ -569,7 +570,6 @@ class BotAgent:
 
     def register(self, **kwargs):
         self.logger.info('register,come in, pool.size :%d', self.user_part_pool.qsize())
-        registry.BOT_AGENT_LIVES.set(self.user_part_pool.qsize())
         user_part = self.user_part_pool.get()
         acc = self.accounts.get(user_part)
         self.logger.info('register, user_part :%d, pool.size :%d', user_part, self.user_part_pool.qsize())