Class: TTK::Daemons::Daemon

Inherits:
Daemon
  • Object
show all
Includes:
Abstract
Defined in:
lib/ttk/daemons/Daemon.rb,
lib/ttk/daemons/daemon/logger.rb

Direct Known Subclasses

Master, Slave

Defined Under Namespace

Classes: Logger

Instance Method Summary collapse

Instance Method Details

#start_daemon(opts, argv) ⇒ Object



16
17
18
19
20
21
22
23
24
25
# File 'lib/ttk/daemons/Daemon.rb', line 16

def start_daemon(opts, argv)
  monitor_server = Services::MonitorServer.new
  add_observable(monitor_server)
  monitor = Monitors::Monitor.new
  add_global_observer(monitor)
  start_service(monitor_server,
                opts[:monitor_uri],
                monitor,
                opts[:max_observers])
end