Files
GX-gp-notify/app.py
T

26 lines
632 B
Python

#!/usr/bin/env python3
"""
企业微信回调服务器 WSGI 应用入口
用于 uWSGI 等部署环境
"""
import sys
import os
# 添加项目路径
sys.path.insert(0, os.path.dirname(__file__))
try:
from gx_gp_monitor.wechat.callback_server import create_callback_app
# 创建 WSGI 应用对象
app = create_callback_app()
except ImportError as e:
print(f"导入失败: {e}", file=sys.stderr)
print("请确保已安装所有依赖: pip install -r gx_gp_monitor/requirements.txt", file=sys.stderr)
sys.exit(1)
except Exception as e:
print(f"应用创建失败: {e}", file=sys.stderr)
sys.exit(1)