X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/d28b1cebc8b799ea1e65a50826602392b446ea29..2945ea907a7c35da2d03d6775574fb1ad9be2b09:/services/api/script/crunch-dispatch.rb?ds=sidebyside diff --git a/services/api/script/crunch-dispatch.rb b/services/api/script/crunch-dispatch.rb index c39c8ea992..5a990f0cb4 100755 --- a/services/api/script/crunch-dispatch.rb +++ b/services/api/script/crunch-dispatch.rb @@ -78,7 +78,7 @@ class Dispatcher # update our database (and cache) when a node's state changes if @node_state[re[1]] != re[2] @node_state[re[1]] = re[2] - node = Node.where('hostname=?', re[1]).first + node = Node.where('hostname=?', re[1]).order(:last_ping_at).last if node $stderr.puts "dispatch: update #{re[1]} state to #{re[2]}" node.info['slurm_state'] = re[2]