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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7c3f346cd2cec5f751a917cd6141580d6541031a049107d199970b1023e94807
4
- data.tar.gz: 726a052b6aec786b272215de287bdaf5799d745a76b0c55f8f23a1774f8b3d2a
3
+ metadata.gz: b5f9177014a99ce6c0ac2751cbc8dd34589a510e6412533c4c33a783a83cb5f5
4
+ data.tar.gz: 7143a519fdc2f6cd00f441331c24c601c1d2c70eaaa58f95cf1d9a6f2b1fdbe1
5
5
  SHA512:
6
- metadata.gz: 234f803ad71047810a829d49f2c46da457b2e8a46b83b3fa6f50b259c08eb85269d10431a48774ef0512edd15804ff1cafd64ea1fd3b2ff882c2dd441f845914
7
- data.tar.gz: 5ec8624894e2e712097dea243eeb88fbe724b91819acb893d228f9c184652ec5332759a82061ef0bf43cfc218726d42582fe4c4c297fd5386e5c867b573d023b
6
+ metadata.gz: 3173aede632715cf33a530fc8d161baa667be9a887a8f0632c8bd7fa929ad972857b95d830720999d753e909202d7dc688deb7eca806a80e135d6ef22c1fe253
7
+ data.tar.gz: fc1bcda91214a46918cb7ca7f64e376a82517d01c15f10590df1d48074e26e7524fa83a8e3cb2933557f6810d4fe31043993535536d079f83e7d6794be481207
data/CHANGELOG.md CHANGED
@@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.6.0] - 2021-03-29
10
+ - Fix for rate limiter
11
+
9
12
  ## [0.5.0] - 2021-03-29
10
13
 
11
14
  - Added install rake task.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- founders_toolkit (0.4.0)
4
+ founders_toolkit (0.6.0)
5
5
  activemodel (~> 6.1)
6
6
  activesupport (~> 6.1)
7
7
 
@@ -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
- statsd.time(['throttled', limiter_name].join('.')) do
35
- sleep 1 while limiter.exceeded?(__send__(key), threshold: threshold, interval: interval)
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FoundersToolkit
4
- VERSION = '0.5.0'
4
+ VERSION = '0.6.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: founders_toolkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Trae Robrock