mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-10 00:12:09 +00:00
Fix get-webmentions diagnostics
This commit is contained in:
parent
2b016aa973
commit
d88d98f829
1 changed files with 4 additions and 2 deletions
|
@ -16,8 +16,10 @@ stale_after_minutes=90
|
||||||
fallback_stale_after_minutes=1440
|
fallback_stale_after_minutes=1440
|
||||||
|
|
||||||
skip_check=0
|
skip_check=0
|
||||||
|
times_run=0
|
||||||
|
|
||||||
check_cached_webmentions() {
|
check_cached_webmentions() {
|
||||||
|
times_run="$((times_run + 1))"
|
||||||
if [ "$skip_check" = 0 ]; then
|
if [ "$skip_check" = 0 ]; then
|
||||||
expires_in="$fallback_stale_after_minutes"
|
expires_in="$fallback_stale_after_minutes"
|
||||||
if [ $# -gt 0 ]; then
|
if [ $# -gt 0 ]; then
|
||||||
|
@ -34,8 +36,8 @@ check_cached_webmentions() {
|
||||||
exit_status=0
|
exit_status=0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ "$exit_status" = 1 ]; then
|
if [ "$exit_status" = 1 ] && [ "$times_run" = 2 ]; then
|
||||||
echo "webmentions are outdated. failed to fetch for over a day."
|
echo "Webmentions are outdated. failed to fetch for over a day."
|
||||||
fi
|
fi
|
||||||
exit "$exit_status"
|
exit "$exit_status"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue