From: Tom Clegg Date: Sun, 17 Mar 2013 22:29:18 +0000 (-0700) Subject: fix no-tasks-todo -> success logic X-Git-Tag: 1.1.0~3421 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/3929021181f8eb2ee2288d085083249159cc398e fix no-tasks-todo -> success logic --- diff --git a/script/dispatch_jobs.rb b/script/dispatch_jobs.rb index 7f93de375b..0eea8d57cc 100755 --- a/script/dispatch_jobs.rb +++ b/script/dispatch_jobs.rb @@ -166,9 +166,6 @@ class Dispatcher j[:job].reload j[:job].update_attributes running: true end - elsif taskid == '' and message.match /^status: .* 0 todo/ - $stderr.puts "dispatch: noticed #{job_uuid} succeeded" - j[:success] = true elsif taskid == '' and (re = message.match /^outputkey (\S+)$/) $stderr.puts "dispatch: noticed #{job_uuid} output #{re[1]}" j[:output] = re[1] @@ -198,6 +195,10 @@ class Dispatcher j[:job].tasks_summary[:todo] = re[3].to_i j[:job].save end + if re[2].to_i == 0 and re[3].to_i == 0 + $stderr.puts "dispatch: noticed #{job_uuid} succeeded" + j[:success] = true + end end end end