|
@@ -548,7 +548,7 @@ class AgentStateService:
|
|
|
|
|
|
def assign_agent(self, saas_id, service_id, called=None, ivr_id=None, task_id=None, cbp=None):
|
|
|
choose_phone_num = ''
|
|
|
- self.logger.info("assignAgent %s %s %s", saas_id, service_id, called)
|
|
|
+ self.logger.info("assignAgent %s %s %s"% (saas_id, service_id, called), flush=True)
|
|
|
idle_agents = self.idle_agents(saas_id, service_id)
|
|
|
if len(idle_agents) <= 0:
|
|
|
return choose_phone_num
|
|
@@ -563,7 +563,7 @@ class AgentStateService:
|
|
|
cache_agent_list = self.get_cache_agent_list(saas_id, service_id)
|
|
|
if not cache_agent_list:
|
|
|
return []
|
|
|
- agent_str = '\n'.join(["%s-%s-%s-%s".format(x.phone_num, x.status, x.time, x.assign_time) for x in cache_agent_list])
|
|
|
+ agent_str = '\n'.join(["%s-%s-%s-%s"%(x.phone_num, x.status, x.time, x.assign_time) for x in cache_agent_list])
|
|
|
print("assignAgent %s %s idleAgents:%s "% (saas_id, service_id, agent_str), flush=True)
|
|
|
return self.get_idle_agents(cache_agent_list)
|
|
|
|