Commit 29d2508f by Feanil Patel

Make pre-supervisor more readable.

parent b531c2e3
...@@ -5,10 +5,40 @@ task ...@@ -5,10 +5,40 @@ task
setuid {{ supervisor_user }} setuid {{ supervisor_user }}
{% if programs_code_dir is defined %} {%- if programs_code_dir is defined %}
{% set programs_command = "--programs-env " + programs_home + "/programs_env --programs-code-dir " + programs_code_dir + " --programs-python " + COMMON_BIN_DIR + "/python.programs" %} {% set programs_command = "--programs-env {{ programs_home }}/programs_env --programs-code-dir {{ programs_code_dir }} --programs-python {{ COMMON_BIN_DIR }}/python.programs" %}
{% else %} {% else %}
{% set programs_command = "" %} {% set programs_command = "" %}
{% endif %} {% endif %}
exec {{ supervisor_venv_dir }}/bin/python {{ supervisor_app_dir }}/pre_supervisor_checks.py --available={{ supervisor_available_dir }} --enabled={{ supervisor_cfg_dir }} {% if SUPERVISOR_HIPCHAT_API_KEY is defined %}--hipchat-api-key {{ SUPERVISOR_HIPCHAT_API_KEY }} --hipchat-room {{ SUPERVISOR_HIPCHAT_ROOM }} {% endif %} {% if edxapp_code_dir is defined %}--edxapp-python {{ COMMON_BIN_DIR }}/python.edxapp --edxapp-code-dir {{ edxapp_code_dir }}{% endif %} {% if xqueue_code_dir is defined %}--xqueue-code-dir {{ xqueue_code_dir }} --xqueue-python {{ COMMON_BIN_DIR }}/python.xqueue {% endif %} {% if ecommerce_code_dir is defined %}--ecommerce-env {{ ecommerce_home }}/ecommerce_env --ecommerce-code-dir {{ ecommerce_code_dir }} --ecommerce-python {{ COMMON_BIN_DIR }}/python.ecommerce {% endif %} {% if insights_code_dir is defined %}--insights-env {{ insights_home }}/insights_env --insights-code-dir {{ insights_code_dir }} --insights-python {{ COMMON_BIN_DIR }}/python.insights {% endif %} {% if analytics_api_code_dir is defined %}--analytics-api-env {{ analytics_api_home }}/analytics_api_env --analytics-api-code-dir {{ analytics_api_code_dir }} --analytics-api-python {{ COMMON_BIN_DIR }}/python.analytics_api {% endif %} {{ programs_command }} {%- if edxapp_code_dir is defined %}
{% set edxapp_command = "--edxapp-python {{ COMMON_BIN_DIR }}/python.edxapp --edxapp-code-dir {{ edxapp_code_dir }}" %}
{% else %}
{% set edxapp_command = "" %}
{% endif %}
{%- if xqueue_code_dir is defined %}
{% set xqueue_command = "--xqueue-code-dir {{ xqueue_code_dir }} --xqueue-python {{ COMMON_BIN_DIR }}/python.xqueue" %}
{% else %}
{% set xqueue_command = "" %}
{% endif %}
{% if ecommerce_code_dir is defined %}
{% set ecommerce_command = "--ecommerce-env {{ ecommerce_home }}/ecommerce_env --ecommerce-code-dir {{ ecommerce_code_dir }} --ecommerce-python {{ COMMON_BIN_DIR }}/python.ecommerce" %}
{% else %}
{% set ecommerce_command = "" %}
{% endif %}
{% if insights_code_dir is defined %}
{% set insights_command = "--insights-env {{ insights_home }}/insights_env --insights-code-dir {{ insights_code_dir }} --insights-python {{ COMMON_BIN_DIR }}/python.insights" %}
{% else %}
{% set insights_command = "" %}
{% endif %}
{% if analytics_api_code_dir is defined %}
{% set analytics_api_command = "--analytics-api-env {{ analytics_api_home }}/analytics_api_env --analytics-api-code-dir {{ analytics_api_code_dir }} --analytics-api-python {{ COMMON_BIN_DIR }}/python.analytics_api" %}
{% else %}
{% set analytics_api_command = "" %}
{% endif %}
exec {{ supervisor_venv_dir }}/bin/python {{ supervisor_app_dir }}/pre_supervisor_checks.py --available={{ supervisor_available_dir }} --enabled={{ supervisor_cfg_dir }} {% if SUPERVISOR_HIPCHAT_API_KEY is defined %}--hipchat-api-key {{ SUPERVISOR_HIPCHAT_API_KEY }} --hipchat-room {{ SUPERVISOR_HIPCHAT_ROOM }} {% endif %} {{ programs_command }} {{ edxapp_command }} {{ xqueue_command }} {{ ecommerce_command }} {{ insights_command }} {{ analytics_api_command }}
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