From 1a9cae8cb745795e501f90f313e95c410e8f9d0a Mon Sep 17 00:00:00 2001 From: youngS Date: Tue, 28 Sep 2021 17:59:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96uwsgi=20=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fir_ser/api/management/commands/services/services/base.py | 2 ++ fir_ser/api/management/commands/services/services/uwsgi.py | 1 + 2 files changed, 3 insertions(+) diff --git a/fir_ser/api/management/commands/services/services/base.py b/fir_ser/api/management/commands/services/services/base.py index 850f921..882d5f4 100644 --- a/fir_ser/api/management/commands/services/services/base.py +++ b/fir_ser/api/management/commands/services/services/base.py @@ -157,6 +157,8 @@ class BaseService(object): print(f'Stop service: {self.name}', end='') sig = 9 if force else 15 + if self.name == 'uwsgi' and sig == 15: + sig = 2 os.kill(self.pid, sig) if self.process is None: diff --git a/fir_ser/api/management/commands/services/services/uwsgi.py b/fir_ser/api/management/commands/services/services/uwsgi.py index 96466eb..3a0db98 100644 --- a/fir_ser/api/management/commands/services/services/uwsgi.py +++ b/fir_ser/api/management/commands/services/services/uwsgi.py @@ -30,6 +30,7 @@ class UwsgiService(BaseService): '--buffer-size', '65536', '--vacuum', '--enable-threads', + '--master', ] if self.uwsgi_socket_mode: