Class: EnhanceSwarm::Monitor

Inherits:
Object
  • Object
show all
Defined in:
lib/enhance_swarm/monitor.rb

Instance Method Summary collapse

Constructor Details

#initializeMonitor

Returns a new instance of Monitor.



9
10
11
12
# File 'lib/enhance_swarm/monitor.rb', line 9

def initialize
  @config = EnhanceSwarm.configuration
  @process_monitor = ProcessMonitor.new
end

Instance Method Details

#statusObject



22
23
24
25
# File 'lib/enhance_swarm/monitor.rb', line 22

def status
  # Delegate to built-in process monitor
  @process_monitor.status
end

#watch(interval: nil, timeout: nil) ⇒ Object



14
15
16
17
18
19
20
# File 'lib/enhance_swarm/monitor.rb', line 14

def watch(interval: nil, timeout: nil)
  interval ||= @config.monitor_interval
  timeout ||= @config.monitor_timeout

  # Delegate to built-in process monitor
  @process_monitor.watch(interval: interval, timeout: timeout)
end