1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-09-19 20:02:10 +00:00

Fix get-webmentions diagnostics

This commit is contained in:
Rohan Kumar 2023-11-23 19:03:40 -08:00
parent 2b016aa973
commit d88d98f829
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479

View file

@ -16,8 +16,10 @@ stale_after_minutes=90
fallback_stale_after_minutes=1440
skip_check=0
times_run=0
check_cached_webmentions() {
times_run="$((times_run + 1))"
if [ "$skip_check" = 0 ]; then
expires_in="$fallback_stale_after_minutes"
if [ $# -gt 0 ]; then
@ -34,8 +36,8 @@ check_cached_webmentions() {
exit_status=0
fi
fi
if [ "$exit_status" = 1 ]; then
echo "webmentions are outdated. failed to fetch for over a day."
if [ "$exit_status" = 1 ] && [ "$times_run" = 2 ]; then
echo "Webmentions are outdated. failed to fetch for over a day."
fi
exit "$exit_status"
fi