Add --retry to curl

This commit is contained in:
Jaidyn Ann 2024-05-06 21:18:58 -05:00
parent fc51fca9d7
commit d312272794

View File

@ -186,7 +186,8 @@ statuses_api_request() {
local id="$(url_post_id "$post_url")" local id="$(url_post_id "$post_url")"
local server="$(url_server "$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}" "${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_reblogs=${EXCLUDE_REBLOGS}&limit=$MAX_POSTS"
status_url="${status_url}&exclude_replies=${EXCLUDE_REPLIES}$TAG_FILTER" 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" \ "$status_url" \
| jq -c '.[]' | jq -c '.[]'
} }