mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-10 00:12:09 +00:00
Fix: exit check_cached_webmentions early
This commit is contained in:
parent
226ee52f85
commit
aebc49772e
1 changed files with 3 additions and 3 deletions
|
@ -24,8 +24,6 @@ check_cached_webmentions() {
|
||||||
expires_in="$fallback_stale_after_minutes"
|
expires_in="$fallback_stale_after_minutes"
|
||||||
if [ $# -gt 0 ]; then
|
if [ $# -gt 0 ]; then
|
||||||
expires_in="$1"
|
expires_in="$1"
|
||||||
else
|
|
||||||
echo "Failed to fetch webmentions. Using fallback cache expiry."
|
|
||||||
fi
|
fi
|
||||||
exit_status=1
|
exit_status=1
|
||||||
if [ -f "$webmentions_file" ]; then
|
if [ -f "$webmentions_file" ]; then
|
||||||
|
@ -34,12 +32,14 @@ check_cached_webmentions() {
|
||||||
echo 'Using cached webmentions'
|
echo 'Using cached webmentions'
|
||||||
skip_check=1
|
skip_check=1
|
||||||
exit_status=0
|
exit_status=0
|
||||||
|
return 0
|
||||||
fi
|
fi
|
||||||
|
return 1
|
||||||
fi
|
fi
|
||||||
if [ "$exit_status" = 1 ] && [ "$times_run" = 2 ]; 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."
|
||||||
|
exit "$exit_status"
|
||||||
fi
|
fi
|
||||||
exit "$exit_status"
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue