sidekiq-dynamic-throttle 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -8
- data/lib/sidekiq-dynamic-throttle/throttler.rb +11 -0
- data/lib/sidekiq-dynamic-throttle/version.rb +1 -1
- data/lib/sidekiq-dynamic-throttle.rb +4 -2
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6e6b2133bce30fa72f42ff1da1ed1cd411133ecd
|
4
|
+
data.tar.gz: 527f40097dd9d5efa61ce788fdc1cdfac5d546be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d6267cf3a02690234c246371b5164dbece349eb8f83bb7d20cd4903801976b4be09635c0e7adc202dcedbc1c444ae3fd5cfcd604d6f937425ba86a9d1647577
|
7
|
+
data.tar.gz: 65ed36c1ca23a384e22043917b5abcc7aee79fdb7e27a9cffbdd26c4ccc3382504656d22e65ebc215103e4af833f7bc169de9500e19d1691404c0ca54813731e
|
data/CHANGELOG.md
CHANGED
@@ -1,11 +1,7 @@
|
|
1
|
-
## 0.1.
|
1
|
+
## 0.1.1 (Jan 8, 2015)
|
2
2
|
|
3
|
-
*
|
3
|
+
* [bobbrez] Add module for convience adding throttles
|
4
4
|
|
5
|
-
|
5
|
+
## 0.1.0 (Jan 8, 2015)
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
* Initial release.
|
10
|
-
|
11
|
-
*Blake Thomas*
|
7
|
+
* [bobbrez] Initial project setup including queue throttling base on throttles
|
@@ -3,13 +3,15 @@ require 'sidekiq/fetch'
|
|
3
3
|
|
4
4
|
require 'sidekiq-dynamic-throttle/version'
|
5
5
|
require 'sidekiq-dynamic-throttle/fetch'
|
6
|
+
require 'sidekiq-dynamic-throttle/throttler'
|
6
7
|
|
7
8
|
module Sidekiq::DynamicThrottle
|
8
9
|
def self.throttles
|
9
10
|
@throttles ||= Hash.new { |hash, key| hash[key] = [] }
|
10
11
|
end
|
11
12
|
|
12
|
-
def self.register_throttle(
|
13
|
-
|
13
|
+
def self.register_throttle(throttle, *queues)
|
14
|
+
queues.flatten!
|
15
|
+
queues.each { |queue| throttles['queue:' + queue.to_s] << throttle }
|
14
16
|
end
|
15
17
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq-dynamic-throttle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bob Breznak
|
@@ -136,6 +136,7 @@ files:
|
|
136
136
|
- lib/sidekiq-dynamic-throttle.rb
|
137
137
|
- lib/sidekiq-dynamic-throttle/fetch.rb
|
138
138
|
- lib/sidekiq-dynamic-throttle/server.rb
|
139
|
+
- lib/sidekiq-dynamic-throttle/throttler.rb
|
139
140
|
- lib/sidekiq-dynamic-throttle/version.rb
|
140
141
|
- sidekiq-dynamic-throttle.gemspec
|
141
142
|
- spec/sidekiq-rate-limiter/fetch_spec.rb
|