sidekiq-limit_fetch 4.2.0 → 4.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -8
- data/gemfiles/sidekiq_6.0.gemfile.lock +2 -2
- data/gemfiles/sidekiq_6.1.gemfile.lock +2 -2
- data/gemfiles/sidekiq_6.2.gemfile.lock +2 -2
- data/gemfiles/sidekiq_6.3.gemfile.lock +2 -2
- data/gemfiles/sidekiq_6.4.gemfile.lock +2 -2
- data/gemfiles/sidekiq_6.5.gemfile.lock +2 -2
- data/gemfiles/sidekiq_master.gemfile.lock +2 -2
- data/lib/sidekiq/limit_fetch/global/monitor.rb +2 -2
- data/lib/sidekiq/limit_fetch/unit_of_work.rb +9 -1
- data/lib/sidekiq/limit_fetch.rb +11 -2
- data/sidekiq-limit_fetch.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ca583389b5cea0b31200752d2c0dd85a03d38a7ea576c9a299a99367a1c8086d
|
|
4
|
+
data.tar.gz: 335f49aac1d3ee9128a3c92eb88a25010d906a8b8d8701d1a79b1e41349ca256
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 00daee076b583097d361fed04a7128188af6d8a287906a644d0449c01dd8748fd4b8b9d233eddfe1f1da22d0492626088f11e4eb9785dd31da75a47c57437726
|
|
7
|
+
data.tar.gz: 110b867205d0aea423ec63d8e010d5d1b75398b5aefce782fdb2320fd5e6114b10d041f59306fadb650d3401ea6a8c2fd962a6fd80d793162d8d14061c510e66
|
data/CHANGELOG.md
CHANGED
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## [4.3.2] - 2022-09-01
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
5
|
+
- #139 - Fix Redis deprecation warnings from [@adamzapasnik](https://github.com/adamzapasnik)
|
|
7
6
|
|
|
8
|
-
## [4.1
|
|
7
|
+
## [4.3.1] - 2022-08-23
|
|
8
|
+
|
|
9
|
+
- #137 - Fix deprecation of passing timeout as positional argument to brpop from [@cgunther](https://github.com/cgunther)
|
|
10
|
+
|
|
11
|
+
## [4.3.0] - 2022-08-16
|
|
12
|
+
|
|
13
|
+
- #135 - Some extra fixes for Sidekiq 6.5 (fixes #128, #130, #131) from [@BobbyMcWho](https://github.com/BobbyMcWho)
|
|
9
14
|
|
|
10
|
-
|
|
15
|
+
## [4.2.0] - 2022-06-09
|
|
16
|
+
|
|
17
|
+
- #127 - Fix for Sidekiq 6.5 internal change vias PR #128 from [@evgeniradev][https://github.com/evgeniradev]
|
|
18
|
+
- testing changes: stop supporting Sidekiq < 6, add tests for Sidekiq 6.5, stop testing on ruby 2.6 EOL
|
|
19
|
+
|
|
20
|
+
## [4.1.0] - 2022-03-29
|
|
11
21
|
|
|
12
22
|
- #101 - Fix stuck queues bug on Redis restart from [@907th](https://github.com/907th).
|
|
13
23
|
|
|
@@ -15,8 +25,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
15
25
|
|
|
16
26
|
This project was taken over by [@deanpcmad](https://github.com/deanpcmad)
|
|
17
27
|
|
|
18
|
-
### Changed
|
|
19
|
-
|
|
20
28
|
- #120 - Migrate CI to GitHub Actions from [@petergoldstein](https://github.com/petergoldstein).
|
|
21
29
|
- #124 - Fixed redis v4.6.0 pipelines deprecation warning from [@iurev](https://github.com/iurev).
|
|
22
|
-
- #83 - Processing dynamic queues from [@alexey-yanchenko](https://github.com/alexey-yanchenko).
|
|
30
|
+
- #83 - Processing dynamic queues from [@alexey-yanchenko](https://github.com/alexey-yanchenko).
|
|
@@ -33,7 +33,7 @@ module Sidekiq::LimitFetch::Global
|
|
|
33
33
|
|
|
34
34
|
def remove_old_processes!
|
|
35
35
|
Sidekiq.redis do |it|
|
|
36
|
-
old_processes.each {|process| it.srem PROCESS_SET, process }
|
|
36
|
+
old_processes.each {|process| it.srem PROCESS_SET, [process] }
|
|
37
37
|
end
|
|
38
38
|
end
|
|
39
39
|
|
|
@@ -48,7 +48,7 @@ module Sidekiq::LimitFetch::Global
|
|
|
48
48
|
Sidekiq.redis do |it|
|
|
49
49
|
it.multi do |pipeline|
|
|
50
50
|
pipeline.set heartbeat_key, true
|
|
51
|
-
pipeline.sadd PROCESS_SET, Selector.uuid
|
|
51
|
+
pipeline.sadd PROCESS_SET, [Selector.uuid]
|
|
52
52
|
pipeline.expire heartbeat_key, ttl
|
|
53
53
|
end
|
|
54
54
|
end
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
module Sidekiq
|
|
2
2
|
class LimitFetch::UnitOfWork < BasicFetch::UnitOfWork
|
|
3
3
|
def initialize(queue, job)
|
|
4
|
-
|
|
4
|
+
if post_6_5?
|
|
5
|
+
super(queue, job, Sidekiq)
|
|
6
|
+
else
|
|
7
|
+
super
|
|
8
|
+
end
|
|
5
9
|
redis_retryable { Queue[queue_name].increase_busy }
|
|
6
10
|
end
|
|
7
11
|
|
|
@@ -17,6 +21,10 @@ module Sidekiq
|
|
|
17
21
|
|
|
18
22
|
private
|
|
19
23
|
|
|
24
|
+
def post_6_5?
|
|
25
|
+
Gem::Version.new(Sidekiq::VERSION) >= Gem::Version.new('6.5.0')
|
|
26
|
+
end
|
|
27
|
+
|
|
20
28
|
def redis_retryable(&block)
|
|
21
29
|
Sidekiq::LimitFetch.redis_retryable(&block)
|
|
22
30
|
end
|
data/lib/sidekiq/limit_fetch.rb
CHANGED
|
@@ -28,13 +28,18 @@ module Sidekiq::LimitFetch
|
|
|
28
28
|
UnitOfWork.new(queue, job) if job
|
|
29
29
|
end
|
|
30
30
|
|
|
31
|
+
def config
|
|
32
|
+
# Post 6.5, Sidekiq.options is deprecated and replaced with passing Sidekiq directly
|
|
33
|
+
post_6_5? ? Sidekiq : Sidekiq.options
|
|
34
|
+
end
|
|
35
|
+
|
|
31
36
|
# Backwards compatibility for sidekiq v6.1.0
|
|
32
37
|
# @see https://github.com/mperham/sidekiq/pull/4602
|
|
33
38
|
def bulk_requeue(*args)
|
|
34
39
|
if Sidekiq::BasicFetch.respond_to?(:bulk_requeue) # < 6.1.0
|
|
35
40
|
Sidekiq::BasicFetch.bulk_requeue(*args)
|
|
36
41
|
else # 6.1.0+
|
|
37
|
-
Sidekiq::BasicFetch.new(
|
|
42
|
+
Sidekiq::BasicFetch.new(config).bulk_requeue(*args)
|
|
38
43
|
end
|
|
39
44
|
end
|
|
40
45
|
|
|
@@ -56,12 +61,16 @@ module Sidekiq::LimitFetch
|
|
|
56
61
|
|
|
57
62
|
private
|
|
58
63
|
|
|
64
|
+
def post_6_5?
|
|
65
|
+
@post_6_5 ||= Gem::Version.new(Sidekiq::VERSION) >= Gem::Version.new('6.5.0')
|
|
66
|
+
end
|
|
67
|
+
|
|
59
68
|
def redis_brpop(queues)
|
|
60
69
|
if queues.empty?
|
|
61
70
|
sleep TIMEOUT # there are no queues to handle, so lets sleep
|
|
62
71
|
[] # and return nothing
|
|
63
72
|
else
|
|
64
|
-
redis_retryable { Sidekiq.redis { |it| it.brpop *queues, TIMEOUT } }
|
|
73
|
+
redis_retryable { Sidekiq.redis { |it| it.brpop *queues, timeout: TIMEOUT } }
|
|
65
74
|
end
|
|
66
75
|
end
|
|
67
76
|
end
|
data/sidekiq-limit_fetch.gemspec
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sidekiq-limit_fetch
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.2
|
|
4
|
+
version: 4.3.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dean Perry
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2022-
|
|
12
|
+
date: 2022-09-01 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: sidekiq
|