Skip to content

Commit

Permalink
Merge pull request #1464 from Bidaya0/feat/use-gevent-as-default
Browse files Browse the repository at this point in the history
feat: use gevent as default.
  • Loading branch information
Bidaya0 authored May 25, 2023
2 parents a9a3802 + d7a6d74 commit d9cac81
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions dongtai_conf/conf/uwsgi.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,17 @@ module = dongtai_conf.wsgi
# master 启动主进程。
master = true
# 最大数量的工作进程数
processes = %k*8
processes = %k
# 指定工作进程中的线程数 %k*8
threads = 1
# worker = 8
listen = 1024
listen = 4096
# 设置socket的权限
chmod-socket = 664
# 退出的时候是否清理环境,自动移除unix Socket 和 Pid 文件
vacuum = true
gevent = 2000
gevent-monkey-patch = true
# thunder-lock = true
# enable-threads = false
static-map = /upload=/opt/dongtai/static
Expand Down
4 changes: 2 additions & 2 deletions dongtai_conf/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

import os

ENABLE_GEVENT = os.environ.get("GEVENT", 'FALSE') == 'TRUE'
if ENABLE_GEVENT:
NOT_GEVENT = os.environ.get("NOT_GEVENT", 'FALSE') == 'TRUE'
if not NOT_GEVENT:
from gevent import monkey
monkey.patch_all()

Expand Down

0 comments on commit d9cac81

Please sign in to comment.