add retry on failure for saints.service
If the Mastodon post fails (e.g. instance temporarily down), systemd will retry up to 5 times at 15-minute intervals over a 12-hour window before triggering the OnFailure notification. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
26efe7f338
commit
d442ee427d
@@ -9,9 +9,13 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Run get_saint_of_the_day.py (profile stats updater)
|
Description=Run get_saint_of_the_day.py (profile stats updater)
|
||||||
OnFailure=notify-gitea-failure@%n.service
|
OnFailure=notify-gitea-failure@%n.service
|
||||||
|
StartLimitBurst=5
|
||||||
|
StartLimitIntervalSec=43200
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=900
|
||||||
EnvironmentFile=%h/.config/saints.env
|
EnvironmentFile=%h/.config/saints.env
|
||||||
ExecStartPre=/usr/bin/nm-online -q
|
ExecStartPre=/usr/bin/nm-online -q
|
||||||
ExecStartPre=/bin/bash -c 'for i in {1..600}; do getent hosts tildegit.org && exit 0; sleep 1; done; exit 1'
|
ExecStartPre=/bin/bash -c 'for i in {1..600}; do getent hosts tildegit.org && exit 0; sleep 1; done; exit 1'
|
||||||
|
|||||||
Reference in New Issue
Block a user