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,28 @@
|
||||
[uwsgi]
|
||||
# 企业微信回调服务器 uWSGI 配置
|
||||
# 指定 WSGI 应用的入口模块和对象
|
||||
module = app:app
|
||||
|
||||
# 项目基本配置
|
||||
chdir = /home/v6ole/pyproject/GX-gp-notify
|
||||
virtualenv = /home/v6ole/pyproject/GX-gp-notify/venv
|
||||
http = 0.0.0.0:18001 # 指定 uWSGI 监听的 HTTP 地址和端口
|
||||
master = true # 启用主进程模式
|
||||
processes = 2 # 设置进程数
|
||||
threads = 2 # 设置每个进程的线程数
|
||||
enable-threads = true # 启用线程
|
||||
harakiri = 30 # 设置超时时间(秒)
|
||||
http-timeout = 30 # 设置HTTP请求超时
|
||||
max-requests = 5000 # 每个进程处理请求数达到此值后自动重启
|
||||
reload-on-rss = 200 # 当进程占用内存超过此值(MB)时自动重启
|
||||
# 指定日志文件的路径和PID文件的路径
|
||||
logto = ./logs/uwsgi-wechat.log
|
||||
pidfile = ./uwsgi-wechat.pid
|
||||
# 当 uWSGI 退出时,自动清理其创建的套接字和 PID 文件
|
||||
vacuum = true
|
||||
# 添加日期到日志
|
||||
log-date = true
|
||||
|
||||
# 自动重载和内存报告配置
|
||||
py-autoreload = 1
|
||||
memory-report = true
|
||||
Reference in New Issue
Block a user