소스 검색

fix: 修改bug

余尚辉 5 달 전
부모
커밋
f295841bb5
2개의 변경된 파일8개의 추가작업 그리고 8개의 파일을 삭제
  1. 4 4
      src/core/callcenter/esl/client.py
  2. 4 4
      src/core/callcenter/views.py

+ 4 - 4
src/core/callcenter/esl/client.py

@@ -396,10 +396,10 @@ class OutboundClient:
 
     def __init__(self, agent, logger):
         self.logger = logger
-        threading.Thread(target=self.start, args=('0.0.0.0', 8084, agent, logger)).start()
-        #server_thread = threading.Thread(target=self.start, args=('0.0.0.0', 8084, agent, logger))
-        #server_thread.daemon = True  # 设置守护线程
-        #server_thread.start()
+        #threading.Thread(target=self.start, args=('0.0.0.0', 8084, agent, logger)).start()
+        server_thread = threading.Thread(target=self.start, args=('0.0.0.0', 8084, agent, logger))
+        server_thread.daemon = True  # 设置守护线程
+        server_thread.start()
 
     class ESLRequestHandler(socketserver.BaseRequestHandler):
         def setup(self):

+ 4 - 4
src/core/callcenter/views.py

@@ -10,15 +10,15 @@ from flask import Flask, request, render_template_string
 from src.core.callcenter.api import AgentCallRequest, AgentActionRequest, HangupCallRequest, \
     HumanServiceQueryRequest
 
-from src.core.voip.bot import BotAgent
+# from src.core.voip.bot import BotAgent
 from src.core.callcenter.call import CallService
 from src.core.callcenter.agent import AgentService, AgentOperService
 from src.core.callcenter.esl.client import InboundClient, OutboundClient
 
-agent = BotAgent(app.logger)
-# agent, _outbound_client = None, None
+# agent = BotAgent(app.logger)
+agent, _outbound_client = None, None
 inbound_client = InboundClient(agent, app.logger)
-outbound_client = OutboundClient(agent, app.logger)
+# outbound_client = OutboundClient(agent, app.logger)
 call_service = CallService(inbound_client, app.logger)
 agent_service = AgentService(inbound_client, app.logger)
 agent_oper_service = AgentOperService(inbound_client, app.logger)