sidekiq-limit_fetch 3.2.1 → 3.3.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e3cffb46d9e10cd316b080cef7fbdee888d65b7a
|
4
|
+
data.tar.gz: 0a944880dee77b36ad0416578c1f8f00058004c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2cb38b4b8b35761c10150975aa0d15396b3c7885d0f02299ef8e7cf977162fcc4145c11b565a404e724ceaebb2d78e9dd392bd834776b846aaf1f5df192128b
|
7
|
+
data.tar.gz: 454b3e24b94f167245a416528d70867c3917dd41fd69669492bb2e47d41aa0d04aba854300da84f8a5e2d706b6e8272ec4dac87a37e44bbe14f67fe6d895022d
|
data/.travis.yml
CHANGED
data/lib/sidekiq/limit_fetch.rb
CHANGED
@@ -10,9 +10,12 @@ module Sidekiq::LimitFetch::Global
|
|
10
10
|
def start!(ttl=HEARTBEAT_TTL, timeout=REFRESH_TIMEOUT)
|
11
11
|
Thread.new do
|
12
12
|
loop do
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
Sidekiq::LimitFetch.redis_retryable do
|
14
|
+
add_dynamic_queues
|
15
|
+
update_heartbeat ttl
|
16
|
+
invalidate_old_processes
|
17
|
+
end
|
18
|
+
|
16
19
|
sleep timeout
|
17
20
|
end
|
18
21
|
end
|
@@ -23,7 +23,10 @@ module Sidekiq::LimitFetch::Queues
|
|
23
23
|
def release_except(full_name)
|
24
24
|
queues = restore
|
25
25
|
queues.delete full_name[/queue:(.*)/, 1] if full_name
|
26
|
-
|
26
|
+
|
27
|
+
Sidekiq::LimitFetch.redis_retryable do
|
28
|
+
selector.release queues, namespace
|
29
|
+
end
|
27
30
|
end
|
28
31
|
|
29
32
|
def dynamic?
|
@@ -2,17 +2,23 @@ module Sidekiq
|
|
2
2
|
class LimitFetch::UnitOfWork < BasicFetch::UnitOfWork
|
3
3
|
def initialize(queue, job)
|
4
4
|
super
|
5
|
-
Queue[queue_name].increase_busy
|
5
|
+
redis_retryable { Queue[queue_name].increase_busy }
|
6
6
|
end
|
7
7
|
|
8
8
|
def acknowledge
|
9
|
-
Queue[queue_name].decrease_busy
|
10
|
-
Queue[queue_name].release
|
9
|
+
redis_retryable { Queue[queue_name].decrease_busy }
|
10
|
+
redis_retryable { Queue[queue_name].release }
|
11
11
|
end
|
12
12
|
|
13
13
|
def requeue
|
14
14
|
super
|
15
15
|
acknowledge
|
16
16
|
end
|
17
|
+
|
18
|
+
private
|
19
|
+
|
20
|
+
def redis_retryable(&block)
|
21
|
+
Sidekiq::LimitFetch.redis_retryable(&block)
|
22
|
+
end
|
17
23
|
end
|
18
24
|
end
|
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: 3.
|
4
|
+
version: 3.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- brainopia
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sidekiq
|
@@ -17,13 +17,13 @@ dependencies:
|
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '4'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
20
|
version_requirements: !ruby/object:Gem::Requirement
|
23
21
|
requirements:
|
24
22
|
- - ">="
|
25
23
|
- !ruby/object:Gem::Version
|
26
24
|
version: '4'
|
25
|
+
prerelease: false
|
26
|
+
type: :runtime
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: redis-namespace
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -34,8 +34,6 @@ dependencies:
|
|
34
34
|
- - ">="
|
35
35
|
- !ruby/object:Gem::Version
|
36
36
|
version: 1.5.2
|
37
|
-
type: :development
|
38
|
-
prerelease: false
|
39
37
|
version_requirements: !ruby/object:Gem::Requirement
|
40
38
|
requirements:
|
41
39
|
- - "~>"
|
@@ -44,6 +42,8 @@ dependencies:
|
|
44
42
|
- - ">="
|
45
43
|
- !ruby/object:Gem::Version
|
46
44
|
version: 1.5.2
|
45
|
+
prerelease: false
|
46
|
+
type: :development
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: rspec
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -51,13 +51,13 @@ dependencies:
|
|
51
51
|
- - ">="
|
52
52
|
- !ruby/object:Gem::Version
|
53
53
|
version: '0'
|
54
|
-
type: :development
|
55
|
-
prerelease: false
|
56
54
|
version_requirements: !ruby/object:Gem::Requirement
|
57
55
|
requirements:
|
58
56
|
- - ">="
|
59
57
|
- !ruby/object:Gem::Version
|
60
58
|
version: '0'
|
59
|
+
prerelease: false
|
60
|
+
type: :development
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: rake
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -65,13 +65,13 @@ dependencies:
|
|
65
65
|
- - ">="
|
66
66
|
- !ruby/object:Gem::Version
|
67
67
|
version: '0'
|
68
|
-
type: :development
|
69
|
-
prerelease: false
|
70
68
|
version_requirements: !ruby/object:Gem::Requirement
|
71
69
|
requirements:
|
72
70
|
- - ">="
|
73
71
|
- !ruby/object:Gem::Version
|
74
72
|
version: '0'
|
73
|
+
prerelease: false
|
74
|
+
type: :development
|
75
75
|
description: |2
|
76
76
|
Sidekiq strategy to restrict number of workers
|
77
77
|
which are able to run specified queues simultaneously.
|
@@ -121,7 +121,7 @@ homepage: https://github.com/brainopia/sidekiq-limit_fetch
|
|
121
121
|
licenses:
|
122
122
|
- MIT
|
123
123
|
metadata: {}
|
124
|
-
post_install_message:
|
124
|
+
post_install_message:
|
125
125
|
rdoc_options: []
|
126
126
|
require_paths:
|
127
127
|
- lib
|
@@ -136,9 +136,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
136
136
|
- !ruby/object:Gem::Version
|
137
137
|
version: '0'
|
138
138
|
requirements: []
|
139
|
-
rubyforge_project:
|
140
|
-
rubygems_version: 2.
|
141
|
-
signing_key:
|
139
|
+
rubyforge_project:
|
140
|
+
rubygems_version: 2.6.4
|
141
|
+
signing_key:
|
142
142
|
specification_version: 4
|
143
143
|
summary: Sidekiq strategy to support queue limits
|
144
144
|
test_files:
|