Class: Wakame::Cli::Subcommand::ActionStatus
- Inherits:
-
Object
- Object
- Wakame::Cli::Subcommand::ActionStatus
- Includes:
- Wakame::Cli::Subcommand
- Defined in:
- lib/wakame/runner/administrator_command.rb
Constant Summary collapse
- ACTION_STATUS_TMPL =
<<__E__ Running Actions : <%= status.size %> action(s) <%- if status.size > 0 -%> <%- status.each { |id, j| -%> JOB <%= id %> : start : <%= j["created_at"] %> <%= tree_subactions(j["root_action"]) %> <%- } -%> <%- end -%> __E__
Instance Method Summary collapse
Methods included from Wakame::Cli::Subcommand
Instance Method Details
#parse(args) ⇒ Object
519 520 521 522 523 524 525 526 |
# File 'lib/wakame/runner/administrator_command.rb', line 519 def parse(args) @params = {} cmd = create_parser(args){|opts| opts. = "Usage: action_status" #opts.separator "" #opts.separator "options:" } end |
#print_result ⇒ Object
532 533 534 535 536 537 538 539 |
# File 'lib/wakame/runner/administrator_command.rb', line 532 def print_result if @res[1]["data"].nil? abort( @res[0]["message"] ) else status = @res[1]['data'] puts ERB.new(ACTION_STATUS_TMPL, nil, '-').result(binding) end end |
#run(requester) ⇒ Object
528 529 530 |
# File 'lib/wakame/runner/administrator_command.rb', line 528 def run(requester) @res = requester.request() end |