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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3cb98cb722b42b03f44006d15ce7e4757f05a31d
4
- data.tar.gz: 6404c4870d5c62574f62e974e9f346aac3229bc3
3
+ metadata.gz: f3cc2b4808589293453f04b82ec7a6ab6da1e881
4
+ data.tar.gz: a8a6984016deb58304ff22ed28b0fe69a8e7584e
5
5
  SHA512:
6
- metadata.gz: f049d391e07472562d17a7f6b6cd84820d3611f0fa53570e423bd4555766ef357cf9f7d7f40b5bdf5bb0ab47867c5448ae8f2b5b5161c3f439a525ca4fd1635f
7
- data.tar.gz: 526a5c584ee5b4d4b35d47ca5a30b4ef416b69690c6e2c5756bedc02e6a4da66bc0a308568685e418d4f1a96ae41785ad3d86a655f28860b6b4e7dacd6817b01
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 = namespace..'probed:'..queue
58
- local pause_key = namespace..'pause:'..queue
59
- local paused = redis.call('get', pause_key)
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
- local limit_key = namespace..'limit:'..queue
63
- local limit = tonumber(redis.call('get', limit_key))
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)
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = 'sidekiq-limit_fetch'
3
- gem.version = '2.2.1'
3
+ gem.version = '2.2.2'
4
4
  gem.license = 'MIT'
5
5
  gem.authors = 'brainopia'
6
6
  gem.email = 'brainopia@evilmartians.com'
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.1
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-23 00:00:00.000000000 Z
11
+ date: 2014-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sidekiq