Created
December 9, 2013 12:20
-
-
Save mrchilds/7871446 to your computer and use it in GitHub Desktop.
Example....
This file contains 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
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