774056846 4 달 전
부모
커밋
a05cee71b7
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      src/core/callcenter/agent.py
  2. 1 1
      src/core/callcenter/cache.py

+ 1 - 1
src/core/callcenter/agent.py

@@ -612,7 +612,7 @@ class AgentStateService:
         for phone_num, json_value in map_cache_by_key.items():
             agent_status_data_dict = json.loads(json_value)
             agent_status_data = AgentStateData(**agent_status_data_dict)  # 解析 JSON 为 AgentStateData 对象
-            agent_status_data.phone_num = phone_num  # 设置电话号码
+            agent_status_data.phone_num = phone_num.decode('utf-8')  # 设置电话号码
             free_agents.append(agent_status_data)
         return free_agents
 

+ 1 - 1
src/core/callcenter/cache.py

@@ -63,7 +63,7 @@ class Cache:
     def add_call_info(self, call: CallInfo):
         for k, v in call.device_info_map.items():
             self.add_device(k, call.call_id)
-        print('add_call_info', call.call_id, call, flush=True)
+        # print('add_call_info', call.call_id, call, flush=True)
         self.redis_handler.set(CALL_INFO + call.call_id, call.to_json_string(), self.cacheDay * 24 * 60 * 60)