|
@@ -6,13 +6,16 @@ base_dir = os.path.dirname(os.path.abspath(__file__))
|
|
|
log_dir = os.path.join(base_dir, 'log')
|
|
log_dir = os.path.join(base_dir, 'log')
|
|
|
if not os.path.isdir(log_dir):
|
|
if not os.path.isdir(log_dir):
|
|
|
os.makedirs(log_dir)
|
|
os.makedirs(log_dir)
|
|
|
-bind = '0.0.0.0:56789' # 绑定ip和端口号
|
|
|
|
|
|
|
+bind = '0.0.0.0:56788' # 绑定ip和端口号
|
|
|
backlog = 1024 # 监听队列
|
|
backlog = 1024 # 监听队列
|
|
|
-# chdir = '/data/szmg/szmg/bigdata/' # gunicorn要切换到的目的工作目录
|
|
|
|
|
chdir = base_dir
|
|
chdir = base_dir
|
|
|
-worker_class = 'gevent' # 使用gevent模式,还可以使用sync 模式,默认的是sync模式
|
|
|
|
|
|
|
+workers = 1
|
|
|
|
|
+threads = 1
|
|
|
|
|
+# worker_class = 'gevent' # 使用gevent模式,还可以使用sync 模式,默认的是sync模式
|
|
|
#workers = multiprocessing.cpu_count() * 2 + 1 # 进程数(多进程数据不互通,默认workers为1,单进程模式)
|
|
#workers = multiprocessing.cpu_count() * 2 + 1 # 进程数(多进程数据不互通,默认workers为1,单进程模式)
|
|
|
loglevel = 'debug' # 日志级别,这个日志级别指的是错误日志的级别,而访问日志的级别无法设置
|
|
loglevel = 'debug' # 日志级别,这个日志级别指的是错误日志的级别,而访问日志的级别无法设置
|
|
|
errorlog = os.path.join(log_dir, "error.log") #错误日志
|
|
errorlog = os.path.join(log_dir, "error.log") #错误日志
|
|
|
accesslog = os.path.join(log_dir, "access.log") #访问日志
|
|
accesslog = os.path.join(log_dir, "access.log") #访问日志
|
|
|
|
|
+timeout = 120
|
|
|
daemon = True
|
|
daemon = True
|
|
|
|
|
+
|