server启动之后,填入callback

This commit is contained in:
liuwei
2025-04-23 11:50:57 +08:00
parent 1a4d40174e
commit 990171b38a
3 changed files with 8 additions and 16 deletions

View File

@@ -56,9 +56,7 @@ def start_fastapi_server(host="0.0.0.0", port=8999):
server_thread.start()
logger.info(f"FastAPI 服务已在 http://{host}:{port} 启动")
logger.info(f"回调URL: http://{host}:{port}/gewechat/callback")
# 启动之后填入callback
gewe_client.client_set_callback()
# 返回启动的端口,以便调用者知道实际使用的端口
return port
except Exception as e:
logger.error(f"启动FastAPI服务器失败: {e}", exc_info=True)