6 Star 10 Fork 3

x2x4/gitee_trigger

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
gunicorn.cfg.py 1.30 KB
一键复制 编辑 原始数据 按行查看 历史
x2x4 提交于 2018-10-17 16:50 +08:00 . update
# encoding: utf-8
import multiprocessing
bind = '0.0.0.0:10080'
preload_app = True
# 开启进程
workers = 4
# workers = multiprocessing.cpu_count() * 2 + 1
# 每个进程的开启线程
# threads = multiprocessing.cpu_count() * 2
threads = multiprocessing.cpu_count() * 2
backlog = 2048
#工作模式为meinheld
# pip install meinheld
worker_class = "egg:meinheld#gunicorn_worker"
# debug=True
daemon = True
# 进程名称
proc_name = 'gunicorn.pid'
# 进程pid记录文件
pidfile = '/tmp/UpdateDev.pid.log'
chdir = '/home/runner/UpdateHook'
loglevel = 'info'
logfile = '/tmp/app_UpdateHook_debug.log'
access_log_format = '%(t)s %(p)s %(h)s "%(r)s" %(s)s %(L)s %(b)s %(f)s" "%(a)s"' #设置gunicorn访问日志格式,错误日志无法设置
"""
其每个选项的含义如下:
h remote address
l '-'
u currently '-', may be user name in future releases
t date of the request
r status line (e.g. ``GET / HTTP/1.1``)
s status
b response length or '-'
f referer
a user agent
T request time in seconds
D request time in microseconds
L request time in decimal seconds
p process ID
"""
accesslog = "/tmp/gunicorn_access.log" #访问日志文件
errorlog = "/tmp/gunicorn_error.log"
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/x2x4/gitee_trigger.git
git@gitee.com:x2x4/gitee_trigger.git
x2x4
gitee_trigger
gitee_trigger
master

搜索帮助