From f7a7527049ba554b3f2a2ce14f5667d887dcaa62 Mon Sep 17 00:00:00 2001 From: Zev Benjamin Date: Wed, 21 Aug 2013 20:23:23 -0400 Subject: [PATCH] Start and stop all our processes in one invocation of supervisorctl With the supervisor speedups, these run much faster. (imported from commit d8b96178f7c57861e9de8dd640a861c22df6e9ad) --- tools/restart-server | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/tools/restart-server b/tools/restart-server index 1ba094b353..e31280ba40 100755 --- a/tools/restart-server +++ b/tools/restart-server @@ -25,19 +25,11 @@ subprocess.check_call(["python", "./manage.py", "send_stats", "incr", "events.se logging.info("Filling memcached caches") subprocess.check_call(["python", "./manage.py", "fill_memcached_caches"]) -# Restart the FastCGI and related processes via supervisorctl. We -# minimize downtime by restarting Django and Tornado separately from -# the other worker processes. +# Restart the FastCGI and related processes via supervisorctl. logging.info("Killing daemons") -subprocess.check_call(["supervisorctl", "stop", "humbug-workers:*"]) -subprocess.check_call(["supervisorctl", "stop", "humbug-django"]) -subprocess.check_call(["supervisorctl", "stop", "humbug-tornado"]) - +subprocess.check_call(["supervisorctl", "stop", "humbug-workers:* humbug-django humbug-tornado"]) subprocess.check_call(["ln", '-nsf', deploy_path, os.path.join(DEPLOYMENTS_DIR, "current")]) - -subprocess.check_call(["supervisorctl", "start", "humbug-tornado"]) -subprocess.check_call(["supervisorctl", "start", "humbug-django"]) -subprocess.check_call(["supervisorctl", "start", "humbug-workers:*"]) +subprocess.check_call(["supervisorctl", "start", "humbug-tornado humbug-django humbug-workers:*"]) logging.info("Done!") print OKGREEN + "Application restarted successfully!" + ENDC