Sha256: 96910f284c27905720479cc156c8efee27d8d57452dc0daf61848bddbbb936a8

Contents?: true

Size: 448 Bytes

Versions: 6

Compression:

Stored size: 448 Bytes

Contents

require 'tracebin/system_health_sample'
require 'tracebin/puppet_master'
require 'concurrent'

module Tracebin
  class HealthMonitor
    class << self
      def start
        @task = Concurrent::TimerTask.new(execution_interval: 10) do
          health = SystemHealthSample.new
          PuppetMaster.new(health).process
        end

        @task.execute

        self
      end

      def stop!
        @task.shutdown
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
tracebin-0.0.13 lib/tracebin/health_monitor.rb
tracebin-0.0.12 lib/tracebin/health_monitor.rb
tracebin-0.0.11 lib/tracebin/health_monitor.rb
tracebin-0.0.10 lib/tracebin/health_monitor.rb
tracebin-0.0.9 lib/tracebin/health_monitor.rb
tracebin-0.0.8 lib/tracebin/health_monitor.rb