Sha256: 3166d69137402be30668937800f971b55b2c140f7b6b35a0b6cff3c3e7ca0724

Contents?: true

Size: 911 Bytes

Versions: 1

Compression:

Stored size: 911 Bytes

Contents

module Splash
  module Orchestrator

    module SchedulerHooks
      def on_pre_trigger(job, trigger_time)

      end

      def on_post_trigger(job, trigger_time)

      end

      def init_log

      end
    end


    class Scheduler
        include Splash::Constants
        include Splash::Helpers
        include Splash::Config
        def initialize
          @server  = Rufus::Scheduler::new
          @server.extend SchedulerHooks
          @server.init_log
          @result = LogScanner::new
          @server.every '20s' do
            begin
              puts "Notify"
              @result.analyse
              @result.notify
              $stdout.flush
            rescue Errno::ECONNREFUSED
              $stderr.puts "PushGateway seems to be done, please start it."
            end
          end
          @server.join
        end

        def terminate
        end

      end


    end

  end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
prometheus-splash-0.0.3 lib/splash/orchestrator.rb