Stop a paused rsync counting as an absent partner and auto-offboarding the partnership
This commit is contained in:
@@ -244,9 +244,19 @@ if [[ "${PARTNERSHIP_ENABLED:-false}" == true ]]; then
|
|||||||
PARTNER_DRY=""
|
PARTNER_DRY=""
|
||||||
[[ "$DRY_RUN" == true ]] && PARTNER_DRY="--dry-run"
|
[[ "$DRY_RUN" == true ]] && PARTNER_DRY="--dry-run"
|
||||||
|
|
||||||
|
# A successful rsync proves the partner answered; a failed one is evidence it did not. But
|
||||||
|
# rsync being switched off is neither — and it used to be read as "unseen", so the offline
|
||||||
|
# counter climbed every 30 minutes toward the 30-day auto-offboard on a partnership whose
|
||||||
|
# only fault was that RSYNC_ENABLED=false. That is how a deliberately paused sync ends up
|
||||||
|
# dismantling the partnership it was paused for. With no rsync attempt there is nothing to
|
||||||
|
# report, so the check runs without touching the counter either way.
|
||||||
if [[ "$RSYNC_OK" == true ]]; then
|
if [[ "$RSYNC_OK" == true ]]; then
|
||||||
bash "$SCRIPT_DIR/../Partnership/partnership_manager.sh" \
|
bash "$SCRIPT_DIR/../Partnership/partnership_manager.sh" \
|
||||||
--check --remote-seen $PARTNER_DRY
|
--check --remote-seen $PARTNER_DRY
|
||||||
|
elif [[ "${RSYNC_ENABLED:-false}" != true ]]; then
|
||||||
|
echo "Rsync disabled — partnership check runs, offline counter untouched"
|
||||||
|
bash "$SCRIPT_DIR/../Partnership/partnership_manager.sh" \
|
||||||
|
--check $PARTNER_DRY
|
||||||
else
|
else
|
||||||
bash "$SCRIPT_DIR/../Partnership/partnership_manager.sh" \
|
bash "$SCRIPT_DIR/../Partnership/partnership_manager.sh" \
|
||||||
--check --remote-unseen $PARTNER_DRY
|
--check --remote-unseen $PARTNER_DRY
|
||||||
|
|||||||
Reference in New Issue
Block a user