mirror of
https://github.com/django/daphne.git
synced 2025-07-31 17:29:44 +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
|
||||
if self.server._complete_requests_counted > self.server.max_requests:
|
||||
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)
|
||||
sys.exit(0)
|
||||
|
||||
|
|
|
@ -2,4 +2,6 @@ Build: python setup.py sdist bdist_wheel
|
|||
Test Upload: twine upload --repository-url https://test.pypi.org/legacy/ 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