You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SYNC_WARN_COUNT=${SYNC_WARN_COUNT:-0}#value is zero if file does not exist or does not contain what we are expecting
367
-
fi
368
369
if [ $SYNC_WARN_COUNT-ge$SYNC_WARN_THRESHOLD ];then
369
-
# if there are 0 warn counts do not output a message and force a sync job.
370
+
# force a sync
371
+
# if the warn count is zero it means the sync was already forced, do not output a dumb message and continue with the sync job.
370
372
if [ $SYNC_WARN_COUNT-eq 0 ];then
371
373
echo
372
374
DO_SYNC=1
373
375
else
374
-
# if there are more than one warn count, output a message and force a sync job. Do not need to remove warning marker here as it is automatically removed when the sync job is run by this script
376
+
# if there is at least one warn count, output a message and force a sync job. Do not need to remove warning marker here as it is automatically removed when the sync job is run by this script
375
377
echo"Number of threshold warning(s) ($SYNC_WARN_COUNT) has reached/exceeded threshold ($SYNC_WARN_THRESHOLD). Forcing a SYNC job to run. [`date`]"
376
378
mklog "INFO: Number of threshold warning(s) ($SYNC_WARN_COUNT) has reached/exceeded threshold ($SYNC_WARN_THRESHOLD). Forcing a SYNC job to run."
377
379
DO_SYNC=1
@@ -381,19 +383,19 @@ function chk_sync_warn(){
381
383
((SYNC_WARN_COUNT +=1))
382
384
echo$SYNC_WARN_COUNT>$SYNC_WARN_FILE
383
385
if [ $SYNC_WARN_COUNT==$SYNC_WARN_THRESHOLD ];then
384
-
echo"This is the **last** warning left. NOT proceeding with SYNC job. [`date`]"
385
-
mklog "This is the **last** warning left. NOT proceeding with SYNC job. [`date`]"
386
+
echo"This is the **last** warning left. **NOT** proceeding with SYNC job. [`date`]"
387
+
mklog "This is the **last** warning left. **NOT** proceeding with SYNC job. [`date`]"
386
388
DO_SYNC=0
387
389
else
388
-
echo"$((SYNC_WARN_THRESHOLD - SYNC_WARN_COUNT)) threshold warning(s) until the next forced sync. NOT proceeding with SYNC job. [`date`]"
389
-
mklog "INFO: $((SYNC_WARN_THRESHOLD - SYNC_WARN_COUNT)) threshold warning(s) until the next forced sync. NOT proceeding with SYNC job."
390
+
echo"$((SYNC_WARN_THRESHOLD - SYNC_WARN_COUNT)) threshold warning(s) until the next forced sync. **NOT** proceeding with SYNC job. [`date`]"
391
+
mklog "INFO: $((SYNC_WARN_THRESHOLD - SYNC_WARN_COUNT)) threshold warning(s) until the next forced sync. **NOT** proceeding with SYNC job."
390
392
DO_SYNC=0
391
393
fi
392
394
fi
393
395
else
394
396
# NO, so let's skip SYNC
395
-
echo"Forced sync is not enabled. Check $TMP_OUTPUT for details. NOT proceeding with SYNC job. [`date`]"
396
-
mklog "INFO: Forced sync is not enabled. Check $TMP_OUTPUT for details. NOT proceeding with SYNC job."
397
+
echo"Forced sync is not enabled. Check $TMP_OUTPUT for details. **NOT** proceeding with SYNC job. [`date`]"
398
+
mklog "INFO: Forced sync is not enabled. Check $TMP_OUTPUT for details. **NOT** proceeding with SYNC job."
397
399
DO_SYNC=0
398
400
fi
399
401
}
@@ -458,10 +460,10 @@ function prepare_mail() {
458
460
MSG="Sync forced with multiple violations - Deleted files ($DEL_COUNT) / ($DEL_THRESHOLD) and changed files ($UPDATE_COUNT) / ($UP_THRESHOLD)"
0 commit comments