From: Charles Connell Date: Sat, 26 Apr 2014 13:01:41 +0000 (-0400) Subject: Flush memcache when deploying X-Git-Tag: release-20150131~116 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f664a7ab7cceca05557c8e7d4985ac49d4ee338a;p=oweals%2Fkarmaworld.git Flush memcache when deploying --- diff --git a/fabfile.py b/fabfile.py index bcfa331..7bee315 100644 --- a/fabfile.py +++ b/fabfile.py @@ -201,6 +201,12 @@ def restart_gunicorn(): """ supervisorctl('restart', 'gunicorn') +@task +def flush_memcache(): + """ + Clear everything cached in memcached + """ + virtenv_exec('echo "flush_all" | nc localhost 11211') ####### Update Requirements @task @@ -292,9 +298,11 @@ def first_deploy(): check_secrets() install_reqs() syncdb() + compress_static() collect_static() fetch_usde() import_usde() + flush_memcache() start_supervisord() print "You should run `manage.py createsuperuser` in the virtual environment" @@ -309,5 +317,6 @@ def deploy(): syncdb() compress_static() collect_static() + flush_memcache() restart_supervisord() ########## END COMMANDS