founders_toolkit 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/Gemfile.lock +1 -1
- data/lib/founders_toolkit/util/rate_limitable.rb +3 -4
- data/lib/founders_toolkit/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5f9177014a99ce6c0ac2751cbc8dd34589a510e6412533c4c33a783a83cb5f5
|
4
|
+
data.tar.gz: 7143a519fdc2f6cd00f441331c24c601c1d2c70eaaa58f95cf1d9a6f2b1fdbe1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3173aede632715cf33a530fc8d161baa667be9a887a8f0632c8bd7fa929ad972857b95d830720999d753e909202d7dc688deb7eca806a80e135d6ef22c1fe253
|
7
|
+
data.tar.gz: fc1bcda91214a46918cb7ca7f64e376a82517d01c15f10590df1d48074e26e7524fa83a8e3cb2933557f6810d4fe31043993535536d079f83e7d6794be481207
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -14,8 +14,6 @@ rescue LoadError
|
|
14
14
|
raise
|
15
15
|
end
|
16
16
|
|
17
|
-
require_relative '../monitoring/statsdable'
|
18
|
-
|
19
17
|
module FoundersToolkit::Util
|
20
18
|
module RateLimitable
|
21
19
|
extend ActiveSupport::Concern
|
@@ -31,8 +29,9 @@ module FoundersToolkit::Util
|
|
31
29
|
limiter = instance_variable_get("@#{limiter_name}".to_sym)
|
32
30
|
limiter ||= instance_variable_set("@#{limiter_name}".to_sym, Ratelimit.new(name))
|
33
31
|
|
34
|
-
|
35
|
-
|
32
|
+
while limiter.exceeded?(__send__(key), threshold: threshold, interval: interval)
|
33
|
+
statsd.increment ['thottled', limiter_name].join('.')
|
34
|
+
sleep 5
|
36
35
|
end
|
37
36
|
|
38
37
|
result = statsd.time(['retryable', limiter_name].join('.')) do
|