Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>pull/4028/head
| @@ -16,12 +16,12 @@ matrix_synapse_auto_compressor_enabled: true | |||||
| ### Edit the schedule (optional) | ### Edit the schedule (optional) | ||||
| By default the task will run 0 a.m. every day based on the `matrix_synapse_auto_compressor_calendar` variable. It is defined in the format of systemd timer calendar. | |||||
| By default the task will run 0 a.m. every day based on the `matrix_synapse_auto_compressor_schedule` variable. It is defined in the format of systemd timer calendar. | |||||
| To edit the schedule, add the following configuration to your `vars.yml` file (adapt to your needs): | To edit the schedule, add the following configuration to your `vars.yml` file (adapt to your needs): | ||||
| ```yaml | ```yaml | ||||
| matrix_synapse_auto_compressor_calendar: "*-*-* 00:00:00" | |||||
| matrix_synapse_auto_compressor_schedule: "*-*-* 00:00:00" | |||||
| ``` | ``` | ||||
| ### Extending the configuration | ### Extending the configuration | ||||
| @@ -47,7 +47,7 @@ The shortcut commands with the [`just` program](just.md) are also available: `ju | |||||
| ## Usage | ## Usage | ||||
| After installation, `synapse_auto_compressor` will run automatically every day at `00:00:00` (as defined in `matrix_synapse_auto_compressor_calendar` by default). | |||||
| After installation, `synapse_auto_compressor` will run automatically every day at `00:00:00` (as defined in `matrix_synapse_auto_compressor_schedule` by default). | |||||
| ### Manually start the task | ### Manually start the task | ||||
| @@ -56,7 +56,7 @@ matrix_synapse_auto_compressor_database_name: 'synapse' | |||||
| matrix_synapse_auto_compressor_synapse_database: 'postgres://{{ matrix_synapse_auto_compressor_database_username | urlencode() }}:{{ matrix_synapse_auto_compressor_database_password | urlencode() }}@{{ matrix_synapse_auto_compressor_database_hostname }}:{{ matrix_synapse_auto_compressor_database_port }}/{{ matrix_synapse_auto_compressor_database_name }}' | matrix_synapse_auto_compressor_synapse_database: 'postgres://{{ matrix_synapse_auto_compressor_database_username | urlencode() }}:{{ matrix_synapse_auto_compressor_database_password | urlencode() }}@{{ matrix_synapse_auto_compressor_database_hostname }}:{{ matrix_synapse_auto_compressor_database_port }}/{{ matrix_synapse_auto_compressor_database_name }}' | ||||
| # systemd calendar configuration for the compressor job | # systemd calendar configuration for the compressor job | ||||
| matrix_synapse_auto_compressor_calendar: "*-*-* 00:00:00" | |||||
| matrix_synapse_auto_compressor_schedule: "*-*-* 00:00:00" | |||||
| # The number of state groups to work on at once. | # The number of state groups to work on at once. | ||||
| # All of the entries from state_groups_state are requested from the database for state groups that are worked on. | # All of the entries from state_groups_state are requested from the database for state groups that are worked on. | ||||
| @@ -1,4 +1,13 @@ | |||||
| --- | --- | ||||
| - name: (Deprecation) Catch and report renamed settings | |||||
| ansible.builtin.fail: | |||||
| msg: >- | |||||
| Your configuration contains a variable, which now has a different name. | |||||
| Please change your configuration to rename the variable (`{{ item.old }}` -> `{{ item.new }}`). | |||||
| when: "item.old in vars" | |||||
| with_items: | |||||
| - "old": "matrix_synapse_auto_compressor_calendar" | |||||
| "new": "matrix_synapse_auto_compressor_schedule" | |||||
| - name: Fail if required matrix-synapse-auto-compressor settings not defined | - name: Fail if required matrix-synapse-auto-compressor settings not defined | ||||
| ansible.builtin.fail: | ansible.builtin.fail: | ||||
| @@ -3,7 +3,7 @@ Description=Synapse State Auto Compressor Timer | |||||
| [Timer] | [Timer] | ||||
| Unit=matrix-synapse-auto-compressor.service | Unit=matrix-synapse-auto-compressor.service | ||||
| OnCalendar={{ matrix_synapse_auto_compressor_calendar }} | |||||
| OnCalendar={{ matrix_synapse_auto_compressor_schedule }} | |||||
| [Install] | [Install] | ||||
| WantedBy=timers.target | WantedBy=timers.target | ||||