16 lines
643 B
Python
16 lines
643 B
Python
# encoding: UTF-8
|
||
from const import BE_URL
|
||
|
||
workers = 1 # 定义同时开启的处理请求的进程数量,根据网站流量适当调整
|
||
bind = BE_URL
|
||
threads = 2 # 多线程,2个暂时就够用
|
||
|
||
debug = False
|
||
reload = False
|
||
loglevel = 'debug'
|
||
pidfile = "logs/gunicorn.pid"
|
||
accesslog = "logs/access.log" # 每个接口调用会展示在access.log中
|
||
errorlog = "logs/debug.log" # 未处理的报错会在debug.log日志中展示
|
||
timeout = 300 # 每个接口的超时时间
|
||
daemon = True # 是否开启守护进程。不开启可直接在idea或命令行中查看日志,在服务器上需要修改为True来开启守护进程
|