Differential D6883 Diff 24973 site-modules/profile/templates/swh/deploy/loader_opam/opam-manage-shared-state.timer.erb
Changeset View
Changeset View
Standalone View
Standalone View
site-modules/profile/templates/swh/deploy/loader_opam/opam-manage-shared-state.timer.erb
[Install] | [Install] | ||||
WantedBy=timers.target | WantedBy=timers.target | ||||
[Timer] | [Timer] | ||||
OnCalendar=daily | OnCalendar=daily | ||||
AccuracySec=4h | |||||
Persistent=true | Persistent=true | ||||
olasd: This should be `RandomDelaySec`, to avoid all the timers firing at the same time. (probably… | |||||
# every ~4h | |||||
AccuracySec=4h | |||||
RandomizedDelaySec=1200 | |||||
FixedRandomDelay=true | |||||
olasdUnsubmitted Not Done Inline ActionsThis doesn't execute the timer every four hours. What this does is:
All of this means that timer will trigger every 24 hours, at a date within 20 minutes of midnight. If we want updates every 4 hours, we can use: OnCalendar=0..23/4:00:00 RandomizedDelaySec=4h FixedRandomDelay=true If we want updates every day, we can use: OnCalendar=daily RandomizedDelaySec=24h FixedRandomDelay=true olasd: This doesn't execute the timer every four hours.
What this does is:
- `OnCalendar=daily`: Try… | |||||
ardumontAuthorUnsubmitted Done Inline Actionsd'oh right. Thanks. I'm going with the last one (24h). ardumont: d'oh right.
I was focused on the remaining part of the diff.
And then forget to double check… | |||||
Unit=<%= @opam_manage_service_name %>.service | Unit=<%= @opam_manage_service_name %>.service | ||||
[Unit] | [Unit] | ||||
Description=Software Heritage Manage OPAM shared state (<%= @instance %>) timer | Description=Software Heritage Manage OPAM shared state timer |
This should be RandomDelaySec, to avoid all the timers firing at the same time. (probably with FixedRandomDelay=true).