feat:部署服务器报错
This commit is contained in:
@@ -26,7 +26,7 @@ try:
|
||||
with open(yaml_file, "r", encoding="utf-8") as file:
|
||||
yaml_data = yaml.safe_load(file)
|
||||
except Exception:
|
||||
yaml_file = {}
|
||||
yaml_data = {}
|
||||
USE_CACHE: bool = os.getenv("USE_CACHE")
|
||||
if USE_CACHE is None:
|
||||
USE_CACHE = yaml_data.get("USE_CACHE", False)
|
||||
@@ -37,7 +37,8 @@ AgentProfile_Dict = {}
|
||||
Request_Cache: dict[str, str] = {}
|
||||
app = Flask(__name__)
|
||||
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:
|
||||
@@ -1767,4 +1768,5 @@ if __name__ == "__main__":
|
||||
args = parser.parse_args()
|
||||
init()
|
||||
# 使用 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