Class: Warren::App::Consumer
- Inherits:
-
Thor
- Object
- Thor
- Warren::App::Consumer
- Includes:
- Thor::Actions
- Defined in:
- lib/warren/app/consumer.rb
Overview
Warren Thor CLI subcommand used to:
-
Add new consumer configurations
-
Start consumers
Class Method Summary collapse
-
.exit_on_failure? ⇒ Boolean
Ensure we exit with an error in the event of failure.
Instance Method Summary collapse
-
#add(name = nil) ⇒ Void
Invoked by ‘$ warren consumer add` adds a consumer to the `warren_consumers.yml`.
-
#start ⇒ Void
Invoked by ‘$ warren consumer start`.
Class Method Details
.exit_on_failure? ⇒ Boolean
Ensure we exit with an error in the event of failure
20 21 22 |
# File 'lib/warren/app/consumer.rb', line 20 def self.exit_on_failure? true end |
Instance Method Details
#add(name = nil) ⇒ Void
Invoked by ‘$ warren consumer add` adds a consumer to the `warren_consumers.yml`
43 44 45 46 |
# File 'lib/warren/app/consumer.rb', line 43 def add(name = nil) say 'Adding a consumer' Warren::App::ConsumerAdd.invoke(self, name, ) end |
#start ⇒ Void
Invoked by ‘$ warren consumer start`. Starts up the configured consumers
59 60 61 62 |
# File 'lib/warren/app/consumer.rb', line 59 def start say 'Starting consumers' Warren::App::ConsumerStart.invoke(self, ) end |