sidekiq-pauzer 3.0.0 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sidekiq/pauzer/basic_fetch.rb +1 -11
- data/lib/sidekiq/pauzer/queues.rb +9 -12
- data/lib/sidekiq/pauzer/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '093ae8e3f39076f2722fdd8e78429d65ff4bf960a3c9b402a021235656ca24c1'
|
4
|
+
data.tar.gz: 36012fc8092f03f70006e4c6fefe93b85a50036d48cb3d2b32370d229daa182c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0005bfd0f7ad351f00b32e9e4444ec394e88e9a1510458757c1c365169bfc34672ed719f786b072afebb598827aef7e7e8e25cc4bf4bfee1bfd776393a71a00a
|
7
|
+
data.tar.gz: 659c74e2b8709af5704a46b86ff3e2ccd6eda2e0bb8d1cd973386d5be031fc9ba5737485cc59900ee808897f0d33bb5d667b3d53920919eec50a8ef7ffbb4729
|
@@ -10,17 +10,7 @@ module Sidekiq
|
|
10
10
|
private
|
11
11
|
|
12
12
|
def queues_cmd
|
13
|
-
|
14
|
-
if @strictly_ordered_queues
|
15
|
-
@queues
|
16
|
-
else
|
17
|
-
permute = @queues.dup
|
18
|
-
permute.shuffle!
|
19
|
-
permute.uniq!
|
20
|
-
permute
|
21
|
-
end
|
22
|
-
|
23
|
-
queues - Pauzer.paused_queues.map { |name| "queue:#{name}" }
|
13
|
+
super - Pauzer.paused_queues.map { |name| "queue:#{name}" }
|
24
14
|
end
|
25
15
|
end
|
26
16
|
end
|
@@ -12,8 +12,7 @@ module Sidekiq
|
|
12
12
|
|
13
13
|
# @param config [Config]
|
14
14
|
def initialize(config)
|
15
|
-
@
|
16
|
-
@names = []
|
15
|
+
@names = Concurrent::Array.new
|
17
16
|
@redis_key = config.redis_key
|
18
17
|
@refresher = initialize_refresher(config.refresh_rate)
|
19
18
|
end
|
@@ -21,7 +20,7 @@ module Sidekiq
|
|
21
20
|
def each(&block)
|
22
21
|
return to_enum __method__ unless block
|
23
22
|
|
24
|
-
@
|
23
|
+
@names.dup.each(&block)
|
25
24
|
|
26
25
|
self
|
27
26
|
end
|
@@ -71,17 +70,15 @@ module Sidekiq
|
|
71
70
|
end
|
72
71
|
|
73
72
|
def refresh
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
conn.sscan(@redis_key).to_a.uniq.each(&:freeze)
|
80
|
-
end
|
81
|
-
|
82
|
-
@names.replace(names)
|
73
|
+
names = Sidekiq.redis do |conn|
|
74
|
+
# Cursor is not atomic, so there may be duplicates because of
|
75
|
+
# concurrent update operations
|
76
|
+
# See: https://redis.io/commands/scan/#scan-guarantees
|
77
|
+
conn.sscan(@redis_key).to_a.uniq.each(&:freeze)
|
83
78
|
end
|
84
79
|
|
80
|
+
@names.replace(names)
|
81
|
+
|
85
82
|
self
|
86
83
|
end
|
87
84
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq-pauzer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexey Zapparov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-05-
|
11
|
+
date: 2023-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|
@@ -62,9 +62,9 @@ licenses:
|
|
62
62
|
- MIT
|
63
63
|
metadata:
|
64
64
|
homepage_uri: https://gitlab.com/ixti/sidekiq-pauzer
|
65
|
-
source_code_uri: https://gitlab.com/ixti/sidekiq-pauzer/tree/v3.
|
65
|
+
source_code_uri: https://gitlab.com/ixti/sidekiq-pauzer/tree/v3.1.0
|
66
66
|
bug_tracker_uri: https://gitlab.com/ixti/sidekiq-pauzer/issues
|
67
|
-
changelog_uri: https://gitlab.com/ixti/sidekiq-pauzer/blob/v3.
|
67
|
+
changelog_uri: https://gitlab.com/ixti/sidekiq-pauzer/blob/v3.1.0/CHANGES.md
|
68
68
|
rubygems_mfa_required: 'true'
|
69
69
|
post_install_message:
|
70
70
|
rdoc_options: []
|