Class: Wakame::Command::AgentStatus

Inherits:
Object
  • Object
show all
Includes:
Wakame::Command
Defined in:
lib/wakame/command/agent_status.rb

Instance Method Summary collapse

Methods included from Wakame::Command

included, #options=, #params

Instance Method Details

#run(rule) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/wakame/command/agent_status.rb', line 7

def run(rule)
  EM.barrier {
    registered_agents = rule.agent_monitor.registered_agents[@options["agent_id"]]
    service_cluster = rule.service_cluster
    res ={
     :agent_status =>registered_agents.dump_status,
     :service_cluster =>service_cluster.dump_status
    }
    res
  }
end