Skip to content

Commit

Permalink
Print 'ECFLOW Tasks Remaining' message only when the number of tasks …
Browse files Browse the repository at this point in the history
…changes
  • Loading branch information
DusanJovic-NOAA committed May 16, 2024
1 parent 1c6b4d4 commit 49857ec
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/rt_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,7 @@ ecflow_run() {
max_active_tasks=$( grep "task " <<< "${max_active_tasks}" )
max_active_tasks=$( grep -cP 'state:active|state:submitted|state:queued' <<< "${max_active_tasks}" )
echo "rt_utils.sh: Total number of tasks processed -- ${max_active_tasks}"
prev_active_tasks=${active_tasks}
while [[ "${active_tasks}" -ne 0 ]]
do
sleep 10 & wait $!
Expand All @@ -720,7 +721,13 @@ ecflow_run() {
active_tasks=$( grep "task " <<< "${active_tasks}" )
active_tasks=$( grep -cP 'state:active|state:submitted|state:queued' <<< "${active_tasks}" )
set -e
echo "ECFLOW Tasks Remaining: ${active_tasks}/${max_active_tasks}"
if [[ ${active_tasks} -ne ${prev_active_tasks} ]]; then
echo
echo -n "ECFLOW Tasks Remaining: ${active_tasks}/${max_active_tasks} "
prev_active_tasks=${active_tasks}
else
echo -n "."
fi
"${PATHRT}/abort_dep_tasks.py"
done

Expand Down

0 comments on commit 49857ec

Please sign in to comment.