Class: Emque::Consuming::Control::Workers

Inherits:
Object
  • Object
show all
Includes:
Helpers
Defined in:
lib/emque/consuming/control/workers.rb

Constant Summary collapse

COMMANDS =
[:down, :up]

Instance Method Summary collapse

Instance Method Details

#down(topic) ⇒ Object



9
10
11
# File 'lib/emque/consuming/control/workers.rb', line 9

def down(topic)
  app.manager.worker(topic: topic.to_sym, command: :down)
end

#respond_to?(method) ⇒ Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/emque/consuming/control/workers.rb', line 17

def respond_to?(method)
  COMMANDS.include?(method.to_sym)
end

#up(topic) ⇒ Object



13
14
15
# File 'lib/emque/consuming/control/workers.rb', line 13

def up(topic)
  app.manager.worker(topic: topic.to_sym, command: :up)
end