修复webhook url指定无效的问题

This commit is contained in:
2025-10-29 12:11:28 +08:00
parent 38e81dbfe6
commit d36bb2de83
3 changed files with 69 additions and 7 deletions

6
app.py
View File

@@ -127,6 +127,12 @@ if __name__ == "__main__":
if args.webhook_url:
os.environ['WEBHOOK_URL'] = args.webhook_url
logger.info(f"设置Webhook URL: {args.webhook_url}")
# 重新导入配置模块以更新WEBHOOK_URL
import importlib
import config
importlib.reload(config)
logger.info(f"更新后的Webhook URL: {config.WEBHOOK_URL}")
# 启动服务器
uvicorn.run(