Skip to content

Commit

Permalink
add supervisor to fabfile
Browse files Browse the repository at this point in the history
  • Loading branch information
amontalenti committed Feb 22, 2013
1 parent ea0e6bd commit 393caf4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions fabfile.py
Expand Up @@ -39,3 +39,14 @@ def deploy():
rsync_project(remote_dir="servers/" + TEAM_NAME,
local_dir="./",
exclude=("*.pyc", ".git", "rapid-env", "steps", "activate"))

def supervisor_run(cmd):
sudo("supervisorctl {}".format(cmd), shell=False)

@task
def restart():
"""Restart supervisor service."""
supervisor_run("restart {}".format(TEAM_NAME))
run("sleep 1")
supervisor_run("tail -800 {}".format(TEAM_NAME))

0 comments on commit 393caf4

Please sign in to comment.