Class: Larva::Daemon
- Inherits:
-
Object
- Object
- Larva::Daemon
- Defined in:
- lib/larva/daemon.rb
Class Method Summary collapse
Instance Method Summary collapse
- #configure ⇒ Object
-
#initialize(processors, options = {}) ⇒ Daemon
constructor
Allowed Options: :env - Defaults to development :meducation_sdk_secret_key - Defauls to looking in config file.
- #start ⇒ Object
Constructor Details
#initialize(processors, options = {}) ⇒ Daemon
Allowed Options:
:env - Defaults to development
:meducation_sdk_secret_key - Defauls to looking in config file
13 14 15 16 |
# File 'lib/larva/daemon.rb', line 13 def initialize(processors, = {}) @processors = processors @options = end |
Class Method Details
.start(*args) ⇒ Object
3 4 5 6 7 8 |
# File 'lib/larva/daemon.rb', line 3 def self.start(*args) daemon = new(*args) daemon.configure daemon.start daemon end |
Instance Method Details
#configure ⇒ Object
24 25 26 |
# File 'lib/larva/daemon.rb', line 24 def configure Configurator.configure(@options) end |
#start ⇒ Object
18 19 20 21 22 |
# File 'lib/larva/daemon.rb', line 18 def start Filum.logger.info "Starting Workerpool" Larva::WorkerPool.start(@processors) Filum.logger.info "Workerpool Finished" end |