Преглед изворни кода

Make post-start delay for matrix-conduit configurable

pull/3115/head
Slavi Pantaleev пре 2 година
родитељ
комит
f3a9a2b35e
2 измењених фајлова са 12 додато и 3 уклоњено
  1. +9
    -0
      roles/custom/matrix-conduit/defaults/main.yml
  2. +3
    -3
      roles/custom/matrix-conduit/templates/systemd/matrix-conduit.service.j2

+ 9
- 0
roles/custom/matrix-conduit/defaults/main.yml Прегледај датотеку

@@ -30,6 +30,15 @@ matrix_conduit_systemd_required_services_list_custom: []
# List of systemd services that matrix-conduit.service wants # List of systemd services that matrix-conduit.service wants
matrix_conduit_systemd_wanted_services_list: [] matrix_conduit_systemd_wanted_services_list: []


# Controls how long to sleep for after starting the matrix-synapse container.
#
# Delaying, so that the homeserver can manage to fully start and various services
# that depend on it (`matrix_conduit_systemd_required_services_list` and `matrix_conduit_systemd_wanted_services_list`)
# may only start after the homeserver is up and running.
#
# This can be set to 0 to remove the delay.
matrix_conduit_systemd_service_post_start_delay_seconds: 3

# The base container network. It will be auto-created by this role if it doesn't exist already. # The base container network. It will be auto-created by this role if it doesn't exist already.
matrix_conduit_container_network: "" matrix_conduit_container_network: ""




+ 3
- 3
roles/custom/matrix-conduit/templates/systemd/matrix-conduit.service.j2 Прегледај датотеку

@@ -36,9 +36,9 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} network conne


ExecStart={{ devture_systemd_docker_base_host_command_docker }} start --attach matrix-conduit ExecStart={{ devture_systemd_docker_base_host_command_docker }} start --attach matrix-conduit


# Intentional delay, so that the homeserver can manage to start and various services
# that depend on it (After/Requires) may only start after the homeserver is up and running.
ExecStartPost=-{{ matrix_host_command_sleep }} 3
{% if matrix_conduit_systemd_service_post_start_delay_seconds != 0 %}
ExecStartPost=-{{ matrix_host_command_sleep }} {{ matrix_conduit_systemd_service_post_start_delay_seconds }}
{% endif %}


ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} stop --time={{ devture_systemd_docker_base_container_stop_grace_time_seconds }} matrix-conduit 2>/dev/null || true' ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} stop --time={{ devture_systemd_docker_base_container_stop_grace_time_seconds }} matrix-conduit 2>/dev/null || true'
ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-conduit 2>/dev/null || true' ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-conduit 2>/dev/null || true'


Loading…
Откажи
Сачувај