X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/3cc2c876251849002c1377c4631222c26545508d..8298d5a841ac106c408b2834dd73091405c2e180:/services/api/script/crunch-dispatch.rb 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]