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

Make post-start delay for matrix-synapse configurable

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

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

@@ -322,6 +322,15 @@ matrix_synapse_systemd_wanted_services_list_default: []
matrix_synapse_systemd_wanted_services_list_auto: []
matrix_synapse_systemd_wanted_services_list_custom: []

# 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_synapse_systemd_required_services_list` and `matrix_synapse_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_synapse_systemd_service_post_start_delay_seconds: 10

matrix_synapse_in_container_python_packages_path: "/usr/local/lib/python3.11/site-packages"

# Specifies which template files to use when configuring Synapse.


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

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

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

# 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 }} 10
{% if matrix_synapse_systemd_service_post_start_delay_seconds > 0 %}
ExecStartPost=-{{ matrix_host_command_sleep }} {{ matrix_synapse_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-synapse 2>/dev/null || true'
ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-synapse 2>/dev/null || true'


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