Created
December 8, 2012 03:48
-
-
Save dizzyd/4238503 to your computer and use it in GitHub Desktop.
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
@task | |
def check_worker(): | |
# Check the status URL on the loopback | |
r = run("wget --timeout=5 -t 1 -O- http://localhost:8041 2>&1 >/dev/null", warn_only=True, quiet=True) | |
if r.return_code != 0: | |
# Something went wrong; kill all hallwayd.js and attempt to start it | |
sudo("pkill -9 node", warn_only=True) | |
sudo("start hallway-worker", warn_only=True) | |
sudo("start statsd", warn_only=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment