diff --git a/daphne/http_protocol.py b/daphne/http_protocol.py index ec9c0a9..d478d6c 100755 --- a/daphne/http_protocol.py +++ b/daphne/http_protocol.py @@ -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) diff --git a/notes.txt b/notes.txt index 950a717..cf469ab 100644 --- a/notes.txt +++ b/notes.txt @@ -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 \ No newline at end of file +Test Install: pip install -i https://test.pypi.org/simple/ adam-daphne==3.0.9 + +Uninstall everything: pip freeze | xargs pip uninstall -y