Restart runfcgi on deploy

(imported from commit b6316135b5ab9e7fcedf404e81dc74b2cf9495c5)
This commit is contained in:
Keegan McAllister 2012-10-17 23:41:28 -04:00
parent 1d55c06ede
commit 2c9cc7d393
1 changed files with 7 additions and 0 deletions

View File

@ -35,6 +35,13 @@ subprocess.check_call(["git", "fetch"], stdout=open('/dev/null', 'w'))
subprocess.check_call(["git", "reset", "--hard", "origin/master"], stdout=open('/dev/null', 'w')) subprocess.check_call(["git", "reset", "--hard", "origin/master"], stdout=open('/dev/null', 'w'))
#subprocess.check_call(["python", "manage.py", "syncdb"], stdout=open('/dev/null', 'w')) #subprocess.check_call(["python", "manage.py", "syncdb"], stdout=open('/dev/null', 'w'))
# Restart the FastCGI process, which is running in a shell loop in screen.
# TODO: real daemonization
try:
subprocess.check_call(["pkill", "-f", "python manage.py runfcgi"])
except CalledProcessError:
print WARNING + "Could not kill runfcgi; is it running?" + ENDC
print OKGREEN + "Updated deployed version of humbug application!" + ENDC print OKGREEN + "Updated deployed version of humbug application!" + ENDC
if newrev == '0000000000000000000000000000000000000000': if newrev == '0000000000000000000000000000000000000000':