Class: Harmoniser::Launcher::Base
- Inherits:
-
Object
- Object
- Harmoniser::Launcher::Base
- Defined in:
- lib/harmoniser/launcher/base.rb
Instance Attribute Summary collapse
-
#subscribers ⇒ Object
readonly
Returns the value of attribute subscribers.
Instance Method Summary collapse
-
#initialize(configuration:, logger:) ⇒ Base
constructor
A new instance of Base.
- #start ⇒ Object
- #stop ⇒ Object
Constructor Details
#initialize(configuration:, logger:) ⇒ Base
Returns a new instance of Base.
10 11 12 13 14 |
# File 'lib/harmoniser/launcher/base.rb', line 10 def initialize(configuration:, logger:) @configuration = configuration @logger = logger @subscribers = Subscriber.registry end |
Instance Attribute Details
#subscribers ⇒ Object (readonly)
Returns the value of attribute subscribers.
8 9 10 |
# File 'lib/harmoniser/launcher/base.rb', line 8 def subscribers @subscribers end |
Instance Method Details
#start ⇒ Object
16 17 18 19 20 |
# File 'lib/harmoniser/launcher/base.rb', line 16 def start boot_app start_subscribers @logger.info("Subscribers registered to consume messages from queues: klasses = `#{@subscribers}`") end |
#stop ⇒ Object
22 23 24 25 26 |
# File 'lib/harmoniser/launcher/base.rb', line 22 def stop @logger.info("Shutting down!") maybe_close @logger.info("Bye!") end |