Sha256: f66c5dfb4039859bf9e09c0be9e2d057e614deea9cfed617acea1154cd521db7

Contents?: true

Size: 420 Bytes

Versions: 11

Compression:

Stored size: 420 Bytes

Contents

module Heartcheck
  module Executors
    class Base
      def dispatch(checkers)
        checkers.map do |checker|
          track_and_check(checker)
        end
      end

      def track_and_check(checker)
        started = Time.now
        checker.check.tap do |checked|
          checked[:time] = ((Time.now - started) * 1_000.0)
          Logger.info MultiJson.dump(checked)
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
heartcheck-2.0.0 lib/heartcheck/executors/base.rb
heartcheck-1.6.0 lib/heartcheck/executors/base.rb
heartcheck-1.5.1 lib/heartcheck/executors/base.rb
heartcheck-1.5.0 lib/heartcheck/executors/base.rb
heartcheck-1.4.0 lib/heartcheck/executors/base.rb
heartcheck-1.3.0 lib/heartcheck/executors/base.rb
heartcheck-1.2.2 lib/heartcheck/executors/base.rb
heartcheck-1.2.1 lib/heartcheck/executors/base.rb
heartcheck-1.2.0 lib/heartcheck/executors/base.rb
heartcheck-1.1.1 lib/heartcheck/executors/base.rb
heartcheck-1.1.0 lib/heartcheck/executors/base.rb