|
@@ -64,9 +64,9 @@ class AgentOperService:
|
|
|
self.agent_actionlog_service.insert_check_state(agent_monitor, AgentCheck.IN, AgentLogState.CHECKIN)
|
|
|
self.agent_state_service.checkin(agent.saas_id, agent.out_id, agent.phone_num)
|
|
|
|
|
|
- if req.scene == AgentScene.MANUAL.code:
|
|
|
- # 如果是手动外呼增加置闲
|
|
|
- self._handle_idle(req.scene, agent)
|
|
|
+ # if req.scene == AgentScene.MANUAL.code:
|
|
|
+ # # 如果是手动外呼增加置忙
|
|
|
+ # self._handle_idle(req.scene, agent)
|
|
|
return self._push_event_for_checkin(agent, agent_monitor, phone, req.scene)
|
|
|
def checkout(self, req: AgentActionRequest):
|
|
|
agent = _get_agent(req.saas_id, req.agent_id)
|
|
@@ -553,7 +553,6 @@ class AgentStateService:
|
|
|
|
|
|
def handle_assign_time(self, saas_id, service_id, choose_phone_num):
|
|
|
key = self._key(saas_id, service_id)
|
|
|
- print(1111111)
|
|
|
cache_agent_map = self.get_cache_agent_map(saas_id, service_id)
|
|
|
if cache_agent_map and choose_phone_num in cache_agent_map:
|
|
|
state_data = cache_agent_map[choose_phone_num]
|
|
@@ -564,7 +563,6 @@ 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 []
|
|
@@ -587,7 +585,6 @@ class AgentStateService:
|
|
|
# self.update_report_state(saas_id, service_id)
|
|
|
|
|
|
def busy_hash(self, saas_id, agent_id, phone_num, service_id):
|
|
|
- print("busy_hash23232323")
|
|
|
cache_agent_map = self.get_cache_agent_map(saas_id, service_id)
|
|
|
state_data = cache_agent_map.get(phone_num)
|
|
|
key = self._key(saas_id, service_id)
|
|
@@ -599,7 +596,6 @@ 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:
|
|
@@ -611,7 +607,6 @@ 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,7 +632,6 @@ 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)
|
|
@@ -646,7 +640,6 @@ 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)
|