Class: Tracebin::HealthMonitor

Inherits:
Object
  • Object
show all
Defined in:
lib/tracebin/health_monitor.rb

Class Method Summary collapse

Class Method Details

.startObject



8
9
10
11
12
13
14
15
16
17
# File 'lib/tracebin/health_monitor.rb', line 8

def start
  @task = Concurrent::TimerTask.new(execution_interval: 10) do
    health = SystemHealthSample.new
    PuppetMaster.new(health).process
  end

  @task.execute

  self
end

.stop!Object



19
20
21
# File 'lib/tracebin/health_monitor.rb', line 19

def stop!
  @task.shutdown
end