Commit 00233214 authored by Maiken's avatar Maiken

Merge branch 'scanpbs-miss-jobs' into 'master'

Fix counting of new jobs in scan-pbs

See merge request !945
parents 8fb864cc 543690e7
Pipeline #7501 failed with stages
in 113 minutes and 31 seconds
...@@ -110,7 +110,7 @@ process_log_file () { ...@@ -110,7 +110,7 @@ process_log_file () {
exited_killed_jobs=`egrep '^[^;]*;0010;[^;]*;Job;|^[^;]*;0008;[^;]*;Job;[^;]*;Exit_status=|^[^;]*;0008;[^;]*;Job;[^;]*;Job deleted' ${lname} | tail -n+$(( $lines_skip + 1 ))` exited_killed_jobs=`egrep '^[^;]*;0010;[^;]*;Job;|^[^;]*;0008;[^;]*;Job;[^;]*;Exit_status=|^[^;]*;0008;[^;]*;Job;[^;]*;Job deleted' ${lname} | tail -n+$(( $lines_skip + 1 ))`
#TODO should we add processed lines before jobs have actually been processed? What if the last job only has half a record? #TODO should we add processed lines before jobs have actually been processed? What if the last job only has half a record?
new_lines=`echo "$exited_killed_jobs" | wc -l` new_lines=`echo -n "$exited_killed_jobs" | wc -l`
# new_lines set to 1 when string is empty, should have been 0 # new_lines set to 1 when string is empty, should have been 0
[ "x$exited_killed_jobs" = x ] && continue [ "x$exited_killed_jobs" = x ] && continue
...@@ -314,8 +314,8 @@ if [ "$readable_logs" = 'yes' ] ; then ...@@ -314,8 +314,8 @@ if [ "$readable_logs" = 'yes' ] ; then
process_log_file process_log_file
fi fi
sleep 10 sleep 10
time_count=$(( $time_count + 1 )) time_count=$(( $time_count + 10 ))
if [ "$time_count" -gt 60 ] ; then break ; fi if [ "$time_count" -ge 60 ] ; then break ; fi
done done
exit 0 exit 0
fi fi
......
...@@ -110,7 +110,7 @@ process_log_file () { ...@@ -110,7 +110,7 @@ process_log_file () {
exited_killed_jobs=`egrep '^[^;]*;0010;[^;]*;Job;|^[^;]*;0008;[^;]*;Job;[^;]*;Exit_status=|^[^;]*;0008;[^;]*;Job;[^;]*;Job deleted' ${lname} | tail -n+$(( $lines_skip + 1 ))` exited_killed_jobs=`egrep '^[^;]*;0010;[^;]*;Job;|^[^;]*;0008;[^;]*;Job;[^;]*;Exit_status=|^[^;]*;0008;[^;]*;Job;[^;]*;Job deleted' ${lname} | tail -n+$(( $lines_skip + 1 ))`
#TODO should we add processed lines before jobs have actually been processed? What if the last job only has half a record? #TODO should we add processed lines before jobs have actually been processed? What if the last job only has half a record?
new_lines=`echo "$exited_killed_jobs" | wc -l` new_lines=`echo -n "$exited_killed_jobs" | wc -l`
# new_lines set to 1 when string is empty, should have been 0 # new_lines set to 1 when string is empty, should have been 0
[ "x$exited_killed_jobs" = x ] && continue [ "x$exited_killed_jobs" = x ] && continue
...@@ -314,8 +314,8 @@ if [ "$readable_logs" = 'yes' ] ; then ...@@ -314,8 +314,8 @@ if [ "$readable_logs" = 'yes' ] ; then
process_log_file process_log_file
fi fi
sleep 10 sleep 10
time_count=$(( $time_count + 1 )) time_count=$(( $time_count + 10 ))
if [ "$time_count" -gt 60 ] ; then break ; fi if [ "$time_count" -ge 60 ] ; then break ; fi
done done
exit 0 exit 0
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment