sidekiq-throttled 0.6.4 → 0.6.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +7 -1
- data/lib/sidekiq/throttled/communicator.rb +1 -0
- data/lib/sidekiq/throttled/fetch.rb +1 -0
- data/lib/sidekiq/throttled/strategy/concurrency.lua +3 -3
- data/lib/sidekiq/throttled/strategy/concurrency.rb +2 -2
- 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: 3f24a091044117cd299dc478eca0cdf2592b7e05
|
4
|
+
data.tar.gz: 18cd12c9b4a9a8e4ce273f959a4deae29c7d2c14
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d02ac4f96d6aaf4cae1d0b2a5958efbef48d86410c18b933f9da3fb492c5e6487a7dd6bcf612e1858e0bd0c355827f6b6071341ea2b42ad73b9f59d805cfe8d6
|
7
|
+
data.tar.gz: e9c0d68e0fc016cdbd5369f8d342339fde7c0e67f40cd1a1446025839ccbf7f9c26f9eabed5fafa8521387d93ae3bb61483cfd2f5cae6722488833fc90148939
|
data/CHANGES.md
CHANGED
@@ -1,6 +1,12 @@
|
|
1
|
+
## 0.6.5 (2016-09-04)
|
2
|
+
|
3
|
+
* Fix concurrency throttling when redis-namespace is used.
|
4
|
+
([@ixti])
|
5
|
+
|
6
|
+
|
1
7
|
## 0.6.4 (2016-09-02)
|
2
8
|
|
3
|
-
* Rename
|
9
|
+
* Rename UnitOfWork throttled requeue to `#requeue_throttled`.
|
4
10
|
([@ixti])
|
5
11
|
|
6
12
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
local key = KEYS[1]
|
2
|
-
local jid =
|
3
|
-
local lmt = tonumber(ARGV[
|
4
|
-
local ttl = tonumber(ARGV[
|
2
|
+
local jid = ARGV[1]
|
3
|
+
local lmt = tonumber(ARGV[2])
|
4
|
+
local ttl = tonumber(ARGV[3])
|
5
5
|
|
6
6
|
if lmt <= redis.call("SCARD", key) and 0 == redis.call("SISMEMBER", key, jid) then
|
7
7
|
return 1
|
@@ -44,7 +44,7 @@ module Sidekiq
|
|
44
44
|
|
45
45
|
# @return [Boolean] whenever job is throttled or not
|
46
46
|
def throttled?(jid, *job_args)
|
47
|
-
1 == SCRIPT.eval([key(job_args), jid.to_s
|
47
|
+
1 == SCRIPT.eval([key(job_args)], [jid.to_s, limit(job_args), @ttl])
|
48
48
|
end
|
49
49
|
|
50
50
|
# @return [Integer] Current count of jobs
|
@@ -55,7 +55,7 @@ module Sidekiq
|
|
55
55
|
# Resets count of jobs
|
56
56
|
# @return [void]
|
57
57
|
def reset!(*job_args)
|
58
|
-
Sidekiq.redis { |conn| conn.del(key(job_args)) }
|
58
|
+
Sidekiq.redis { |conn| conn.del(key(job_args)) }
|
59
59
|
end
|
60
60
|
|
61
61
|
# Remove jid from the pool of jobs in progress
|
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.5
|
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-09-
|
11
|
+
date: 2016-09-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sidekiq
|