sidekiq-limit_fetch 2.2.1 → 2.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sidekiq/limit_fetch/global/selector.rb +15 -11
- data/sidekiq-limit_fetch.gemspec +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: f3cc2b4808589293453f04b82ec7a6ab6da1e881
|
4
|
+
data.tar.gz: a8a6984016deb58304ff22ed28b0fe69a8e7584e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 041fce4ab1874ed7fd402cbbf36f0963239460984d9546a0e5fa58596494e1a8204d7eb54f353d276fa4a63e806bd38a6da1b7a21df4c17d37b9d47ea3089733
|
7
|
+
data.tar.gz: 31f3dc81da8b01a08be861ff37f8baca7948c4605769a21d1805ae1db45de1d9e2070de11fae0d89a48e2442f40793edc54baad4262685fe655a7ac0ad6b67fd
|
@@ -54,19 +54,23 @@ module Sidekiq::LimitFetch::Global
|
|
54
54
|
|
55
55
|
for _, queue in ipairs(queues) do
|
56
56
|
if not blocking_mode or unblocked[queue] then
|
57
|
-
local probed_key
|
58
|
-
local pause_key
|
59
|
-
local
|
57
|
+
local probed_key = namespace..'probed:'..queue
|
58
|
+
local pause_key = namespace..'pause:'..queue
|
59
|
+
local limit_key = namespace..'limit:'..queue
|
60
|
+
local process_limit_key = namespace..'process_limit:'..queue
|
61
|
+
local block_key = namespace..'block:'..queue
|
62
|
+
|
63
|
+
local paused, limit, process_limit, can_block =
|
64
|
+
unpack(redis.call('mget',
|
65
|
+
pause_key,
|
66
|
+
limit_key,
|
67
|
+
process_limit_key,
|
68
|
+
block_key
|
69
|
+
))
|
60
70
|
|
61
71
|
if not paused then
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
local process_limit_key = namespace..'process_limit:'..queue
|
66
|
-
local process_limit = tonumber(redis.call('get', process_limit_key))
|
67
|
-
|
68
|
-
local block_key = namespace..'block:'..queue
|
69
|
-
local can_block = redis.call('get', block_key)
|
72
|
+
limit = tonumber(limit)
|
73
|
+
process_limit = tonumber(process_limit)
|
70
74
|
|
71
75
|
if can_block or limit then
|
72
76
|
locks = redis.call('llen', probed_key)
|
data/sidekiq-limit_fetch.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq-limit_fetch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- brainopia
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sidekiq
|