From c465ddff19be2a80b0e19b0b18d67ef074440602 Mon Sep 17 00:00:00 2001 From: shaohuzhang1 <80892890+shaohuzhang1@users.noreply.github.com> Date: Fri, 19 Jul 2024 21:34:17 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E6=B5=81=E5=BC=8F=E8=BE=93=E5=87=BA=20(#820)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/common/management/commands/gunicorn.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/common/management/commands/gunicorn.py b/apps/common/management/commands/gunicorn.py index 27e8860d9..6098b31b4 100644 --- a/apps/common/management/commands/gunicorn.py +++ b/apps/common/management/commands/gunicorn.py @@ -30,10 +30,10 @@ class Command(BaseCommand): def handle(self, *args, **options): log_format = '%(h)s %(t)s %(L)ss "%(r)s" %(s)s %(b)s ' cmd = [ - 'gunicorn', 'smartdoc.asgi:application', + 'gunicorn', 'smartdoc.wsgi:application', '-b', options.get('b') if options.get('b') is not None else '0.0.0.0:8080', - '-k', options.get('k') if options.get('k') is not None else 'uvicorn.workers.UvicornWorker', - '-w', options.get('w') if options.get('w') is not None else '5', + '-k', options.get('k') if options.get('k') is not None else 'gunicorn.workers.sync.SyncWorker', + '-w', options.get('w') if options.get('w') is not None else '1', '--max-requests', options.get('max_requests') if options.get('max_requests') is not None else '10240', '--max-requests-jitter', options.get('max_requests_jitter') if options.get('max_requests_jitter') is not None else '2048',