feat:部署服务器报错
This commit is contained in:
@@ -7,3 +7,4 @@ mistralai==0.1.6
|
|||||||
flask-socketio==5.3.6
|
flask-socketio==5.3.6
|
||||||
python-socketio==5.11.0
|
python-socketio==5.11.0
|
||||||
simple-websocket==1.0.0
|
simple-websocket==1.0.0
|
||||||
|
eventlet==0.40.4
|
||||||
@@ -26,7 +26,7 @@ try:
|
|||||||
with open(yaml_file, "r", encoding="utf-8") as file:
|
with open(yaml_file, "r", encoding="utf-8") as file:
|
||||||
yaml_data = yaml.safe_load(file)
|
yaml_data = yaml.safe_load(file)
|
||||||
except Exception:
|
except Exception:
|
||||||
yaml_file = {}
|
yaml_data = {}
|
||||||
USE_CACHE: bool = os.getenv("USE_CACHE")
|
USE_CACHE: bool = os.getenv("USE_CACHE")
|
||||||
if USE_CACHE is None:
|
if USE_CACHE is None:
|
||||||
USE_CACHE = yaml_data.get("USE_CACHE", False)
|
USE_CACHE = yaml_data.get("USE_CACHE", False)
|
||||||
@@ -37,7 +37,8 @@ AgentProfile_Dict = {}
|
|||||||
Request_Cache: dict[str, str] = {}
|
Request_Cache: dict[str, str] = {}
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
app.config['SECRET_KEY'] = 'agentcoord-secret-key'
|
app.config['SECRET_KEY'] = 'agentcoord-secret-key'
|
||||||
socketio = SocketIO(app, cors_allowed_origins="*", async_mode='threading')
|
# socketio = SocketIO(app, cors_allowed_origins="*", async_mode='threading')
|
||||||
|
socketio = SocketIO(app, cors_allowed_origins="*", async_mode='eventlet')
|
||||||
|
|
||||||
|
|
||||||
def truncate_rehearsal_log(RehearsalLog: List, restart_from_step_index: int) -> List:
|
def truncate_rehearsal_log(RehearsalLog: List, restart_from_step_index: int) -> List:
|
||||||
@@ -1767,4 +1768,5 @@ if __name__ == "__main__":
|
|||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
init()
|
init()
|
||||||
# 使用 socketio.run 替代 app.run,支持WebSocket
|
# 使用 socketio.run 替代 app.run,支持WebSocket
|
||||||
socketio.run(app, host="0.0.0.0", port=args.port, debug=True, allow_unsafe_werkzeug=True)
|
# socketio.run(app, host="0.0.0.0", port=args.port, debug=True, allow_unsafe_werkzeug=True)
|
||||||
|
socketio.run(app, host="0.0.0.0", port=args.port, debug=False, allow_unsafe_werkzeug=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user