Remove deprecated files and scripts related to cron jobs and WeChat server functionality. Update README to include new server startup methods using uWSGI and Gunicorn. Ensure callback server configuration is loaded properly in production environments. Clean up unnecessary test scripts and example files to streamline the project structure.
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#!/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)
|
||||
Reference in New Issue
Block a user