1 Star 0 Fork 22

小阿张/test-platform-api

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
gunicorn_config_main.py 467 Bytes
一键复制 编辑 原始数据 按行查看 历史
向前走 提交于 2023-11-24 09:10 . 更新
# -*- coding: utf-8 -*-
import gevent.monkey
gevent.monkey.patch_all()
import multiprocessing
from config import _main_server_port
bind = f'0.0.0.0:{_main_server_port}' # 访问地址
workers = multiprocessing.cpu_count() * 2 + 1 # 启动的进程数,cpu个数 * 2 + 1
worker_class = 'gevent' # 使用gevent模式,还可以使用sync 模式,默认的是sync模式
threads = 20 # 每个进程开启的线程数
x_forwarded_for_header = 'X_FORWARDED-FOR'
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/xiao-azhang/test-platform-api.git
git@gitee.com:xiao-azhang/test-platform-api.git
xiao-azhang
test-platform-api
test-platform-api
master

搜索帮助