Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example....
def pre_staging_restart_services():
"""
Restart celery and gunicorn services
Used by newer staging environments
"""
# Install requirements
with virtualenv():
run('pip install -r /srv/CustomMade/requirements.txt')
if 'web' in env.host:
with virtualenv():
run('/srv/CustomMade/manage.py compress')
run("sudo supervisorctl restart gunicorn")
if 'util' in env.host or 'management' in env.host:
run("sudo supervisorctl restart celery")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.