|
@@ -568,6 +568,7 @@ class AgentStateService:
|
|
|
|
|
|
|
|
|
def idle_agents(self, saas_id, service_id):
|
|
|
+ self.logger.info("ceshi5555")
|
|
|
cache_agent_list = self.get_cache_agent_list(saas_id, service_id)
|
|
|
if not cache_agent_list:
|
|
|
return []
|
|
@@ -601,6 +602,7 @@ class AgentStateService:
|
|
|
# self.update_report_state(saas_id, service_id)
|
|
|
|
|
|
def get_cache_agent_map(self, saas_id, service_id):
|
|
|
+ self.logger.info("ceshi1223")
|
|
|
cache_agent_list = self.get_cache_agent_list(saas_id, service_id)
|
|
|
# 检查列表是否为空,如果为空返回空字典
|
|
|
if not cache_agent_list:
|
|
@@ -612,6 +614,7 @@ class AgentStateService:
|
|
|
def get_cache_agent_list(self, saas_id, service_id):
|
|
|
redis_key = self._key(saas_id, service_id)
|
|
|
map_cache_by_key = self.redis_handler.redis.hgetall(redis_key)
|
|
|
+ self.logger.info("ceshi444444")
|
|
|
self.logger.info("get_cache_agent_list, redis_key=%s, map_cache_by_key=%s"%(redis_key, map_cache_by_key))
|
|
|
if not map_cache_by_key: # 检查字典是否为空
|
|
|
return [] # 返回空列表
|
|
@@ -637,6 +640,7 @@ class AgentStateService:
|
|
|
|
|
|
def get_agent_service_idle_size(self, saas_id, service_id):
|
|
|
idle_agents_size = 0
|
|
|
+ self.logger.info("ceshi3333")
|
|
|
cache_agent_list = self.get_cache_agent_list(saas_id, service_id)
|
|
|
if cache_agent_list: # 检查列表是否非空
|
|
|
idle_agents = self.get_idle_agents(cache_agent_list)
|
|
@@ -645,6 +649,7 @@ class AgentStateService:
|
|
|
|
|
|
def get_agent_service_busy_size(self, saas_id, service_id):
|
|
|
busy_agents_size = 0
|
|
|
+ self.logger.info("ceshi22222")
|
|
|
cache_agent_list = self.get_cache_agent_list(saas_id, service_id)
|
|
|
if cache_agent_list: # 检查列表是否非空
|
|
|
idle_agents = self.get_idle_agents(cache_agent_list)
|