Changed daily script to master.conf variables
This commit is contained in:
@@ -191,30 +191,6 @@ start_containers() {
|
||||
done
|
||||
}
|
||||
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
# RSYNC SLOT LIMITER
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
wait_for_rsync() {
|
||||
: "${RETRY_COUNT:=5}"
|
||||
: "${MAX_RSYNC_PROCS:=2}"
|
||||
: "${SLEEP:=2}"
|
||||
|
||||
for i in $(seq 1 "$RETRY_COUNT"); do
|
||||
COUNT=$(ps -eo cmd | grep "[r]sync .*${REMOTE_SERVER}" | wc -l || true)
|
||||
|
||||
if [[ "$COUNT" -ge "$MAX_RSYNC_PROCS" ]]; then
|
||||
warn "$ICON_RETRY Waiting for rsync slot ($COUNT/$MAX_RSYNC_PROCS) — attempt $i/$RETRY_COUNT"
|
||||
sleep "$SLEEP"
|
||||
else
|
||||
log "Rsync slot available ($COUNT/$MAX_RSYNC_PROCS)"
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
|
||||
error "Too many rsync processes after $RETRY_COUNT attempts, aborting."
|
||||
exit 1
|
||||
}
|
||||
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
# RSYNC OPTIONS
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user