|
@@ -45,23 +45,23 @@ class AcdService:
|
|
|
if not agent_number:
|
|
|
# 如果没有空闲坐席,播放等待音
|
|
|
text = "AcdService transferToAgent agentNumber is empty serviceId:%s,called:%s,callId:%s"%(service_id, call_info.called, call_info.call_id)
|
|
|
- print(text, flush=True)
|
|
|
+ # print(text, flush=True)
|
|
|
self.logger.info(text)
|
|
|
self.add_acd_queue(call_info, service_id)
|
|
|
else:
|
|
|
# 有空闲坐席,直接转接
|
|
|
text = "AcdService transferToAgent agentNumber not empty %s, serviceId:%s,called:%s,callId:%s"%(agent_number, service_id, call_info.called, call_info.call_id)
|
|
|
- print(text, flush=True)
|
|
|
+ # print(text, flush=True)
|
|
|
self.logger.info(text)
|
|
|
self.call_service.transfer(call_info, agent_number, service_id)
|
|
|
self.cache.add_call_info(call_info)
|
|
|
|
|
|
def try_transfer_agent(self):
|
|
|
- print("AcdService tryTransferAgent start", len(self.holdsQueue), flush=True)
|
|
|
- self.logger.info("AcdService tryTransferAgent start")
|
|
|
+ # print("AcdService tryTransferAgent start", len(self.holdsQueue), flush=True)
|
|
|
+ # self.logger.info("AcdService tryTransferAgent start")
|
|
|
all_task = []
|
|
|
for k, v in self.holdsQueue.items():
|
|
|
- print("AcdService tryTransferAgent start, queue.k:%s, queue.v:%s"% (k, v.qsize()), flush=True)
|
|
|
+ # print("AcdService tryTransferAgent start, queue.k:%s, queue.v:%s"% (k, v.qsize()), flush=True)
|
|
|
self.logger.info("AcdService tryTransferAgent start, queue.k:%s, queue.v:%s", k, v.qsize())
|
|
|
if v.qsize() <= 0:
|
|
|
self.holdsQueue.pop(k, None)
|
|
@@ -82,19 +82,19 @@ class AcdService:
|
|
|
call_id = call_info_queue.get_nowait()
|
|
|
call_info = self.cache.get_call_info(call_id)
|
|
|
if not call_info or not call_info.device_list:
|
|
|
- print("AcdService tryTransferAgent callInfoCache is null ", call_id)
|
|
|
+ # print("AcdService tryTransferAgent callInfoCache is null ", call_id)
|
|
|
self.logger.info("AcdService tryTransferAgent callInfoCache is null %s", call_id)
|
|
|
continue
|
|
|
agent_number = self.agent_service.assign(AgentActionRequest(saas_id=saasId, service_id=task_service_id))
|
|
|
if not agent_number:
|
|
|
text = "AcdService tryTransferAgent agentNumber is Empty %s %s"% (call_id, json.dumps(call_info.device_list))
|
|
|
- print(text, flush=True)
|
|
|
+ # print(text, flush=True)
|
|
|
self.logger.info(text)
|
|
|
tmp_arr.append(call_id)
|
|
|
continue
|
|
|
|
|
|
text = "AcdService tryTransferAgent agentNumber not Empty %s, serviceId:%s, called:%s, callId:%s"%(agent_number, task_service_id, call_info.called, call_id)
|
|
|
- print(text, flush=True)
|
|
|
+ # print(text, flush=True)
|
|
|
self.logger.info(text)
|
|
|
self.call_service.transfer(call_info, agent_number, task_service_id)
|
|
|
|