Better time management in osync-batch.sh
This commit is contained in:
parent
a3246d785c
commit
018d3be7bc
|
@ -7,6 +7,7 @@ KNOWN ISSUES
|
||||||
RECENT CHANGES
|
RECENT CHANGES
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
|
- Small improvements in osync-batch.sh time management
|
||||||
- Improved various logging on error
|
- Improved various logging on error
|
||||||
- Work in progress: Unit tests (intial tests written by onovy, Thanks again!)
|
- Work in progress: Unit tests (intial tests written by onovy, Thanks again!)
|
||||||
- Small Improvements on install and ssh_filter scripts
|
- Small Improvements on install and ssh_filter scripts
|
||||||
|
|
|
@ -72,7 +72,7 @@ function Batch
|
||||||
done
|
done
|
||||||
|
|
||||||
RERUNS=0
|
RERUNS=0
|
||||||
while [ $MAX_EXECUTION_TIME -gt $SECONDS ] && [ "$RUN" != "" ] && [ $MAX_RERUNS -gt $RERUNS ]
|
while ([ $MAX_EXECUTION_TIME -gt $SECONDS ] || [ $MAX_EXECUTION_TIME -eq 0 ]) && [ "$RUN" != "" ] && [ $MAX_RERUNS -gt $RERUNS ]
|
||||||
do
|
do
|
||||||
Log "Osync instances will be run for: $RUN"
|
Log "Osync instances will be run for: $RUN"
|
||||||
for i in $RUN
|
for i in $RUN
|
||||||
|
@ -109,7 +109,7 @@ function Usage
|
||||||
echo "[OPTIONS]"
|
echo "[OPTIONS]"
|
||||||
echo "--path=/path/to/conf Path to osync conf files, defaults to /etc/osync"
|
echo "--path=/path/to/conf Path to osync conf files, defaults to /etc/osync"
|
||||||
echo "--max-reruns=X Number of runs max for failed instances, (defaults to 3)"
|
echo "--max-reruns=X Number of runs max for failed instances, (defaults to 3)"
|
||||||
echo "--max-exec-time=X Retry failed instances only if max execution time not reached (defaults to 36000 seconds)"
|
echo "--max-exec-time=X Retry failed instances only if max execution time not reached (defaults to 36000 seconds). Set to 0 to bypass execution time check."
|
||||||
echo "--dry Will run osync without actually doing anything; just testing"
|
echo "--dry Will run osync without actually doing anything; just testing"
|
||||||
echo "--silent Will run osync without any output to stdout, used for cron jobs"
|
echo "--silent Will run osync without any output to stdout, used for cron jobs"
|
||||||
echo "--verbose Increases output"
|
echo "--verbose Increases output"
|
||||||
|
@ -135,6 +135,9 @@ do
|
||||||
verbose=1
|
verbose=1
|
||||||
opts=$opts" --verbose"
|
opts=$opts" --verbose"
|
||||||
;;
|
;;
|
||||||
|
--no-maxtime)
|
||||||
|
opts=$opts" --no-maxtime"
|
||||||
|
;;
|
||||||
--path=*)
|
--path=*)
|
||||||
CONF_FILE_PATH=${i##*=}
|
CONF_FILE_PATH=${i##*=}
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in New Issue