Class: Mode::Connector::Daemon
- Inherits:
-
Object
- Object
- Mode::Connector::Daemon
- Defined in:
- lib/mode/connector/daemon.rb
Instance Attribute Summary collapse
-
#max_jobs ⇒ Object
readonly
Returns the value of attribute max_jobs.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Daemon
constructor
A new instance of Daemon.
- #start ⇒ Object
- #stop ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Daemon
Returns a new instance of Daemon.
7 8 9 |
# File 'lib/mode/connector/daemon.rb', line 7 def initialize( = {}) @max_jobs = [:max_jobs].to_i || 4 end |
Instance Attribute Details
#max_jobs ⇒ Object (readonly)
Returns the value of attribute max_jobs.
4 5 6 |
# File 'lib/mode/connector/daemon.rb', line 4 def max_jobs @max_jobs end |
Instance Method Details
#start ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/mode/connector/daemon.rb', line 11 def start load_drivers configure_api scheduler.start! rescue => err Mode::Logger.instance.error( self.class.name, err., err.backtrace) end |
#stop ⇒ Object
20 21 22 23 24 25 |
# File 'lib/mode/connector/daemon.rb', line 20 def stop scheduler.stop! rescue => err Mode::Logger.instance.error( self.class.name, err., err.backtrace) end |