Created
October 7, 2013 17:44
-
-
Save kljensen/6871946 to your computer and use it in GitHub Desktop.
How I get verbal notification of code reloads while developing locally... see the "watchmedo....say" part.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| web: env REDIS_MAX_CONNECTIONS=27 gunicorn --pid /tmp/ss-gunicorn.pid -k gevent 'manage:create_and_config_app()' | |
| redis: redis-server bin/config/redis.conf | |
| watchdog:watchmedo shell-command --patterns="*.py;*.yaml" --recursive --command='kill -HUP $(cat /tmp/ss-gunicorn.pid) && say "code reloaded, dude."' |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Notice how watchdog watches files, kills the PID, and calls the
saycommand. Foreman/honcho automatically restarts the processed killed at the PID.