-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
This loop is far too static.
The likelihood of it failing increases with increasing size or after merging content from multiple Confluence instances.
It may not make sense to keep adjusting the retries manually.
shellscripts/atlassian-backup/atlassian-backup.sh
Lines 210 to 228 in 7fc98f6
| for (( c=1; c<=${progress_retries}; c++ )); do | |
| log " * waiting for atlassian ${APP} cloud to finish backup..." | |
| PROGRESS_JSON=$(curl -sSfL -u ${EMAIL}:${API_TOKEN} https://${INSTANCE}/wiki/rest/obm/1.0/getprogress.json || die " * Error while requesting backup generation progress, exiting.") | |
| FILE_NAME=$(echo "$PROGRESS_JSON" | sed -n 's/.*"fileName"[ ]*:[ ]*"\([^"]*\).*/\1/p') | |
| ## PRINT BACKUP STATUS INFO ## | |
| # log "$PROGRESS_JSON" | |
| if [[ ${PROGRESS_JSON} == *"error"* ]]; then | |
| break | |
| fi | |
| if [[ ! -z "${FILE_NAME}" ]]; then | |
| break | |
| fi | |
| # Waits for the amount of seconds specified in progress_sleep variable between a check and the other | |
| sleep ${progress_sleep} | |
| done |
An improvement would be the implementation of a dynamic adjustment of the backoff depending on the progress.
Metadata
Metadata
Assignees
Labels
No labels