Module: SF6::Breaker

Extended by:
Base
Defined in:
lib/sf6.rb

Class Method Summary collapse

Methods included from Base

reset!

Class Method Details

.check(attr, value, bucket, &blk) ⇒ Object



54
55
56
57
58
59
60
61
62
63
64
# File 'lib/sf6.rb', line 54

def self.check(attr, value, bucket, &blk)
  timestamp = stamp(attr, bucket)
  test(attr, value) do
    begin
      yield
    rescue => e
      increment(attr, timestamp)
      raise
    end
  end
end