Add --retry to curl
This commit is contained in:
parent
fc51fca9d7
commit
d312272794
|
@ -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 '.[]'
|
||||||
}
|
}
|
||||||
|
|
Ŝarĝante…
Reference in New Issue