Unverified Commit a788a77a by Kevin Falcone Committed by GitHub

Merge pull request #4611 from edx/jibsheet/pre_supervisor-reload-nginx-sooner

Reload nginx earlier in the process
parents 6e498247 96882c99
......@@ -222,6 +222,12 @@ if __name__ == '__main__':
try:
for service in services_for_instance(instance_id):
if service in NGINX_ENABLE:
subprocess.call(NGINX_ENABLE[service], shell=True)
report.append("Enabling nginx: {}".format(service))
# We have to reload the new config files
subprocess.call("/bin/systemctl reload nginx", shell=True)
if service in MIGRATION_COMMANDS:
services = {
"lms": {'python': args.edxapp_python, 'env_file': args.edxapp_env, 'code_dir': args.edxapp_code_dir},
......@@ -255,12 +261,6 @@ if __name__ == '__main__':
else:
raise Exception("No conf available for service: {}".format(link_location))
if service in NGINX_ENABLE:
subprocess.call(NGINX_ENABLE[service], shell=True)
report.append("Enabling nginx: {}".format(service))
# We have to reload the new config files
subprocess.call("/bin/systemctl reload nginx", shell=True)
except AWSConnectionError as ae:
msg = "{}: ERROR : {}".format(prefix, ae)
if notify:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment