This commit is contained in:
Adam La Morre 2022-02-07 16:31:00 -08:00
parent 03f9c2298b
commit 363313295c
2 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,6 @@
import sys
__version__ = "3.0.13"
__version__ = "3.0.15"
# Windows on Python 3.8+ uses ProactorEventLoop, which is not compatible with

View File

@ -203,6 +203,7 @@ class WebRequest(http.Request):
self.server._complete_requests_counted += 1
if self.server._complete_requests_counted > self.server.max_requests:
logger.info('Max requests completed. Shutting down daphne...')
os.system("ps aux | grep 'daphne'")
bash_command = "kill $(ps aux | grep 'daphne' | awk '{print $2}')"
os.system(bash_command)
sys.exit(0)