|
@@ -11,6 +11,7 @@ import sys
|
|
|
import pjsua2 as pj
|
|
|
from enum import Enum
|
|
|
|
|
|
+from src.core.callcenter import registry
|
|
|
from src.core.callcenter.cache import Cache
|
|
|
from src.core.datasource import SIP_SERVER, SERVE_HOST
|
|
|
from src.core.voip.constant import *
|
|
@@ -567,6 +568,7 @@ class BotAgent:
|
|
|
self.release(user_part)
|
|
|
|
|
|
def register(self, **kwargs):
|
|
|
+ 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())
|