mirror of
https://github.com/django/daphne.git
synced 2025-08-03 18:10:08 +03:00
Better kill command
This commit is contained in:
parent
efaaa3026b
commit
03f9c2298b
|
@ -203,7 +203,7 @@ class WebRequest(http.Request):
|
||||||
self.server._complete_requests_counted += 1
|
self.server._complete_requests_counted += 1
|
||||||
if self.server._complete_requests_counted > self.server.max_requests:
|
if self.server._complete_requests_counted > self.server.max_requests:
|
||||||
logger.info('Max requests completed. Shutting down daphne...')
|
logger.info('Max requests completed. Shutting down daphne...')
|
||||||
bash_command = 'kill $(ps -a | grep daphne | cut -f 1 -d " " | head -n 1)'
|
bash_command = "kill $(ps aux | grep 'daphne' | awk '{print $2}')"
|
||||||
os.system(bash_command)
|
os.system(bash_command)
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
|
|
|
@ -3,3 +3,5 @@ Test Upload: twine upload --repository-url https://test.pypi.org/legacy/ dist/*
|
||||||
Prod Upload: twine upload dist/*
|
Prod Upload: twine upload dist/*
|
||||||
|
|
||||||
Test Install: pip install -i https://test.pypi.org/simple/ adam-daphne==3.0.9
|
Test Install: pip install -i https://test.pypi.org/simple/ adam-daphne==3.0.9
|
||||||
|
|
||||||
|
Uninstall everything: pip freeze | xargs pip uninstall -y
|
||||||
|
|
Loading…
Reference in New Issue
Block a user