Logger "There are $((mainItemCount-counter+postponedItemCount)) / $mainItemCount tasks in the queue of which $postponedItemCount are postponed. Currently, ${#pidsArray[@]} tasks running with pids [$(joinString , ${pidsArray[@]})].""NOTICE"
fi
if[$(((exec_time +1)% keepLogging)) -eq 0];then
if[$log_ttime -ne $exec_time];then# Fix when sleep time lower than 1 second
log_ttime=$exec_time
if[$functionMode=="Wait"];then
if[$functionMode=="WaitForTaskCompletion" ];then
Logger "Current tasks still running with pids [$(joinString , ${pidsArray[@]})].""NOTICE"
elif[$functionMode=="ParallelExec"];then
Logger "There are $((mainItemCount-counter+postponedItemCount)) / $mainItemCount tasks in the queue. Currently, ${#pidsArray[@]} tasks running with pids [$(joinString , ${pidsArray[@]})].""NOTICE"
Logger "There are $((mainItemCount-counter+postponedItemCount)) / $mainItemCount tasks in the queue of which $postponedItemCount are postponed. Currently, ${#pidsArray[@]} tasks running with pids [$(joinString , ${pidsArray[@]})].""NOTICE"
fi
fi
fi
@ -1023,7 +1025,7 @@ function ExecTasks {
fi
for pid in "${pidsArray[@]}";do
KillChilds $pid true
if[$?==0];then
if[$?-eq0];then
Logger "Task with pid [$pid] stopped successfully.""NOTICE"
else
if[$noErrorLogsAtAll !=true];then
@ -1076,7 +1078,7 @@ function ExecTasks {
fi
fi
KillChilds $pid true
if[$?==0];then
if[$?-eq0];then
Logger "Command with pid [$pid] stopped successfully.""NOTICE"
else
if[$noErrorLogsAtAll !=true];then
@ -1104,7 +1106,7 @@ function ExecTasks {
Logger "Command was [${commandsArrayPid[$pid]}].""ERROR"
fi
if[ -f "${commandsArrayOutput[$pid]}"];then
Logger "Command output was [\$(cat ${commandsArrayOutput[$pid]})\n].""ERROR"
Logger "Command output was [$(cat ${commandsArrayOutput[$pid]})\n].""ERROR"
Logger "There are $((mainItemCount-counter+postponedItemCount)) / $mainItemCount tasks in the queue of which $postponedItemCount are postponed. Currently, ${#pidsArray[@]} tasks running with pids [$(joinString , ${pidsArray[@]})].""NOTICE"
fi
if[$(((exec_time +1)% keepLogging)) -eq 0];then
if[$log_ttime -ne $exec_time];then# Fix when sleep time lower than 1 second
log_ttime=$exec_time
if[$functionMode=="Wait"];then
if[$functionMode=="WaitForTaskCompletion" ];then
Logger "Current tasks still running with pids [$(joinString , ${pidsArray[@]})].""NOTICE"
elif[$functionMode=="ParallelExec"];then
Logger "There are $((mainItemCount-counter+postponedItemCount)) / $mainItemCount tasks in the queue. Currently, ${#pidsArray[@]} tasks running with pids [$(joinString , ${pidsArray[@]})].""NOTICE"
Logger "There are $((mainItemCount-counter+postponedItemCount)) / $mainItemCount tasks in the queue of which $postponedItemCount are postponed. Currently, ${#pidsArray[@]} tasks running with pids [$(joinString , ${pidsArray[@]})].""NOTICE"
fi
fi
fi
@ -955,7 +957,7 @@ function ExecTasks {
fi
for pid in "${pidsArray[@]}";do
KillChilds $pid true
if[$?==0];then
if[$?-eq0];then
Logger "Task with pid [$pid] stopped successfully.""NOTICE"
else
if[$noErrorLogsAtAll !=true];then
@ -1008,7 +1010,7 @@ function ExecTasks {
fi
fi
KillChilds $pid true
if[$?==0];then
if[$?-eq0];then
Logger "Command with pid [$pid] stopped successfully.""NOTICE"
else
if[$noErrorLogsAtAll !=true];then
@ -1036,7 +1038,7 @@ function ExecTasks {
Logger "Command was [${commandsArrayPid[$pid]}].""ERROR"
fi
if[ -f "${commandsArrayOutput[$pid]}"];then
Logger "Command output was [\$(cat ${commandsArrayOutput[$pid]})\n].""ERROR"
Logger "Command output was [$(cat ${commandsArrayOutput[$pid]})\n].""ERROR"