Class: Qtrix::CLI::Queues

Inherits:
Base
  • Object
show all
Defined in:
lib/qtrix/cli/queues.rb

Instance Attribute Summary

Attributes inherited from Base

#stderr, #stdout

Instance Method Summary collapse

Methods inherited from Base

#exec, #initialize

Constructor Details

This class inherits a constructor from Qtrix::CLI::Base

Instance Method Details

#exec_behaviorObject



53
54
55
56
57
58
59
60
61
62
63
# File 'lib/qtrix/cli/queues.rb', line 53

def exec_behavior
  if config[:desired_distribution]
    msg = "Queues:\n"
    msg += Qtrix.desired_distribution.map(&stringify).join("\n")
    write(msg)
  elsif queue_weights
    map_queue_weights queue_weights
  elsif queue_weights_yaml
    map_queue_weights queue_weights_yaml
  end
end