Method: Oxidized::Nodes#next

Defined in:
lib/oxidized/nodes.rb

#next(node, opt = {}) ⇒ Object Also known as: top

Parameters:

  • node (String)

    name of the node moved into the head of array



66
67
68
69
70
71
72
73
74
75
76
77
78
79
# File 'lib/oxidized/nodes.rb', line 66

def next node, opt={}
  if waiting.find_node_index(node)
    with_lock do
      n = del node
      n.user = opt['user']
      n.msg  = opt['msg']
      n.from = opt['from']
      # set last job to nil so that the node is picked for immediate update
      n.last = nil
      put n
      jobs.want += 1 if Oxidized.config.next_adds_job?
    end
  end
end