update-deployment: Delete pyc files on deploy.

(imported from commit 852258b1fd1b837807d11e5f4693012cd438c395)
This commit is contained in:
Tim Abbott 2013-01-12 18:11:44 -05:00
parent 904f55a08e
commit d121c51584
1 changed files with 3 additions and 0 deletions

View File

@ -45,6 +45,9 @@ subprocess.check_call(["git", "fetch"], stdout=open('/dev/null', 'w'))
subprocess.check_call(["git", "reset", "--hard", refname], stdout=open('/dev/null', 'w')) subprocess.check_call(["git", "reset", "--hard", refname], 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'))
# Delete all .pyc files to avoid old module files hanging around
subprocess.check_call(["find", ".", "-name", "*.pyc", "-delete"], stdout=open('/dev/null', 'w'))
# Restart the FastCGI process, which is running in a shell loop in screen. # Restart the FastCGI process, which is running in a shell loop in screen.
# TODO: real daemonization # TODO: real daemonization
for cmd in ('runfcgi', 'runtornado'): for cmd in ('runfcgi', 'runtornado'):