sidekiq-throttled 0.6.0 → 0.6.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/CHANGES.md +7 -0
- data/lib/sidekiq/throttled/fetch.rb +10 -3
- data/lib/sidekiq/throttled/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: 62a9ad77603d8384fb1b5f3646e68242a7e47e6a
|
4
|
+
data.tar.gz: ce6e7f785851824533d6657779f2d778805802e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd27f6c8afda43c910319ffd049f9961a86c76170e820bca7d0e15e39f376fe13e83fd34bae141b4ec8b46d7b0106a3b048faed60a3f0c5618d164cfdfe6b902
|
7
|
+
data.tar.gz: 36b7f0c2232ef68fe7eeaa90044234a21b96fe974628b5cc6f96e7e1f2f8b05655b8ab7b531eec0a8d02533927da4dc49cec689549bd1bf53c55b1a2687b25b9
|
data/CHANGES.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
## 0.6.1 (2016-08-30)
|
2
|
+
|
3
|
+
* Trivial internbal API change: extracted queues list builder of `Fetch` into
|
4
|
+
dedicated internal method, allowing to enhance it with extra custom filters.
|
5
|
+
([@ixti])
|
6
|
+
|
7
|
+
|
1
8
|
## 0.6.0 (2016-08-27)
|
2
9
|
|
3
10
|
* [#21](https://github.com/sensortower/sidekiq-throttled/pull/21)
|
@@ -42,10 +42,9 @@ module Sidekiq
|
|
42
42
|
# Tries to pop pair of `queue` and job `message` out of sidekiq queue.
|
43
43
|
#
|
44
44
|
# @see http://redis.io/commands/brpop
|
45
|
-
# @return [Array
|
45
|
+
# @return [Array(String, String), nil]
|
46
46
|
def brpop
|
47
|
-
queues =
|
48
|
-
queues = QueuesPauser.instance.filter queues
|
47
|
+
queues = build_queues_list
|
49
48
|
|
50
49
|
if queues.empty?
|
51
50
|
sleep TIMEOUT
|
@@ -54,6 +53,14 @@ module Sidekiq
|
|
54
53
|
|
55
54
|
Sidekiq.redis { |conn| conn.brpop(*queues, TIMEOUT) }
|
56
55
|
end
|
56
|
+
|
57
|
+
# Returns list of queues to try to fetch jobs from.
|
58
|
+
#
|
59
|
+
# @note It may return an empty array.
|
60
|
+
# @return [Array<String>]
|
61
|
+
def build_queues_list
|
62
|
+
QueuesPauser.instance.filter(@strict ? @queues : @queues.shuffle.uniq)
|
63
|
+
end
|
57
64
|
end
|
58
65
|
end
|
59
66
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq-throttled
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexey V Zapparov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sidekiq
|