Class: Mode::Connector::Daemon
- Inherits:
-
DaemonSpawn::Base
- Object
- DaemonSpawn::Base
- Mode::Connector::Daemon
- Defined in:
- lib/mode/connector/daemon.rb
Instance Attribute Summary collapse
-
#scheduler ⇒ Object
readonly
Returns the value of attribute scheduler.
Instance Method Summary collapse
Instance Attribute Details
#scheduler ⇒ Object (readonly)
Returns the value of attribute scheduler.
6 7 8 |
# File 'lib/mode/connector/daemon.rb', line 6 def scheduler @scheduler end |
Instance Method Details
#start(args) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/mode/connector/daemon.rb', line 8 def start(args) max_jobs = args.shift data_sources = args.shift @scheduler = Mode::Connector::Scheduler.new( data_sources, :max_jobs => max_jobs ) @scheduler.start! rescue => err Mode::Logger.instance.error( "Connector::Daemon", err., err.backtrace) end |
#stop ⇒ Object
22 23 24 |
# File 'lib/mode/connector/daemon.rb', line 22 def stop scheduler.stop! end |