From d312272794c77aa1a931ad41329c12b0ff6d4382 Mon Sep 17 00:00:00 2001 From: Jaidyn Ann <10477760+JadedCtrl@users.noreply.github.com> Date: Mon, 6 May 2024 21:18:58 -0500 Subject: [PATCH] Add --retry to curl --- fedi2html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fedi2html b/fedi2html index d7dd9f0..80a5e58 100755 --- a/fedi2html +++ b/fedi2html @@ -186,7 +186,8 @@ statuses_api_request() { local id="$(url_post_id "$post_url")" local server="$(url_server "$post_url")" - curl --location --header 'Accept: application/json,application/activity+json' \ + curl --retry 3 --retry-delay 5 \ + --location --header 'Accept: application/json,application/activity+json' \ "${server}/api/v1/statuses/${id}${api_request}" } @@ -217,7 +218,8 @@ fetch_user_posts() { status_url="${status_url}?exclude_reblogs=${EXCLUDE_REBLOGS}&limit=$MAX_POSTS" status_url="${status_url}&exclude_replies=${EXCLUDE_REPLIES}$TAG_FILTER" - curl --location --header 'Accept: application/json,application/activity+json' \ + curl --retry 3 --retry-delay 5 \ + --location --header 'Accept: application/json,application/activity+json' \ "$status_url" \ | jq -c '.[]' }