Skip to content

Commit

Permalink
More fab fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
ericholscher committed Dec 18, 2012
1 parent 1f7b792 commit 5129a83
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions fabfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
env.virtualenv = '/home/docs/'
env.rundir = '/home/docs/run'

@hosts(['chimera.readthedocs.com', 'asgard.ericholscher.com'])
@hosts(['chimera.readthedocs.com', 'asgard.readthedocs.com'])
def remove_project(project):
run('rm -rf %s/user_builds/%s' % (env.code_dir, project))

Expand Down Expand Up @@ -45,20 +45,20 @@ def migrate(project=None):
else:
run('django-admin.py migrate')

@hosts(['chimera.readthedocs.com', 'asgard.ericholscher.com'])
@hosts(['chimera.readthedocs.com', 'asgard.readthedocs.com'])
def static():
"Restart (or just start) the server"
run('django-admin.py collectstatic --noinput')

@hosts(['chimera.readthedocs.com', 'asgard.ericholscher.com'])
@hosts(['chimera.readthedocs.com', 'asgard.readthedocs.com'])
def restart():
"Restart (or just start) the server"
env.user = "root"
run("restart readthedocs-gunicorn")
env.user = "docs"
run("supervisorctl restart web")
#so it has time to reload
time.sleep(3)

@hosts(['chimera.readthedocs.com', 'asgard.ericholscher.com'])
@hosts(['chimera.readthedocs.com', 'asgard.readthedocs.com'])
def reload():
"Restart (or just start) the server"
env.user = "docs"
Expand All @@ -67,20 +67,15 @@ def reload():
#so it has time to reload
time.sleep(3)

"""
@hosts(['chimera.readthedocs.com', 'asgard.ericholscher.com'])
@hosts(['chimera.readthedocs.com', 'asgard.readthedocs.com'])
def reload():
"Reload (or just start) the server"
env.user = "root"
run("reload readthedocs-gunicorn")
"""
run("supervisorctl update")

@hosts(['build.readthedocs.com'])
#@hosts(['kirin.readthedocs.com'])
def celery():
"Restart (or just start) the server"
env.user = "root"
run("restart readthedocs-celery")
run("supervisorctl restart celery")

def pull():
"Pull new code"
Expand Down

0 comments on commit 5129a83

Please sign in to comment.