resilient 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/resilient/circuit_breaker.rb +2 -2
- data/lib/resilient/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fff95e3775a3225c6694d41256726d7cf7dd97ed
|
4
|
+
data.tar.gz: 3a60f913516f625995d884e8b738941f76d1e839
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a87785935c77f251a9e9dcd738a4b51aea2d27f87504b30fb7d958a7d94de04a83502d0754a0c05a2c72494b68e7b10ef1f424f89678a434844a44d1aa215bbb
|
7
|
+
data.tar.gz: 54c77250844604e9dd4ff3db089a422a9bca05a4a5779ebfd73b3645fb8484df12bed9c419b44aa6977e960e584b3eb26c2416bf979cb75a0d64f588c0f92be7
|
@@ -103,7 +103,7 @@ module Resilient
|
|
103
103
|
end
|
104
104
|
|
105
105
|
def open?
|
106
|
-
instrument("resilient.circuit_breaker.open") { |payload|
|
106
|
+
instrument("resilient.circuit_breaker.open", key: @key) { |payload|
|
107
107
|
payload[:result] = if @open
|
108
108
|
true
|
109
109
|
else
|
@@ -122,7 +122,7 @@ module Resilient
|
|
122
122
|
end
|
123
123
|
|
124
124
|
def allow_single_request?
|
125
|
-
instrument("resilient.circuit_breaker.allow_single_request") { |payload|
|
125
|
+
instrument("resilient.circuit_breaker.allow_single_request", key: @key) { |payload|
|
126
126
|
now = Time.now.to_i
|
127
127
|
|
128
128
|
payload[:result] = if @open && now > (@opened_or_last_checked_at_epoch + @properties.sleep_window_seconds)
|
data/lib/resilient/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: resilient
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Nunemaker
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|