sidekiq-limit_fetch 4.2.0 → 4.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -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 +1 -1
- data/gemfiles/sidekiq_master.gemfile.lock +2 -2
- data/lib/sidekiq/limit_fetch/unit_of_work.rb +9 -1
- data/lib/sidekiq/limit_fetch.rb +10 -1
- 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: 1e1c022a896ec81cb597f174e844fae80fc2c3c642fbf0872d87c00b0651a378
|
4
|
+
data.tar.gz: b80c13c01232fac37df35c85353974eed389d353fd84c842d368e844a350a8b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c4e5565fff18225cf65f1ef86ace76375fa7c36cd895a132e19ad06d02ba50e3cecfc34d961fa9183374257895b3fb49300d7cda7eeb9bd8875b2e0baac6cc1
|
7
|
+
data.tar.gz: 550341eeafa2a83bc5236223148ca0ffcab8774f4ebcf6832386d7fe0a07e6f7176c5feb8e3c79db333ee5aed6fedf6f6a16124b39e45aab83ded720922e071a
|
data/CHANGELOG.md
CHANGED
@@ -1,13 +1,15 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
-
|
3
|
+
## [4.3.0] - 2022-08-16
|
4
4
|
|
5
|
-
|
6
|
-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
5
|
+
- #135 - Some extra fixes for Sidekiq 6.5 (fixes #128, #130, #131) from [@BobbyMcWho](https://github.com/BobbyMcWho)
|
7
6
|
|
8
|
-
## [4.
|
7
|
+
## [4.2.0] - 2022-06-09
|
8
|
+
|
9
|
+
- #127 - Fix for Sidekiq 6.5 internal change vias PR #128 from [@evgeniradev][https://github.com/evgeniradev]
|
10
|
+
- testing changes: stop supporting Sidekiq < 6, add tests for Sidekiq 6.5, stop testing on ruby 2.6 EOL
|
9
11
|
|
10
|
-
|
12
|
+
## [4.1.0] - 2022-03-29
|
11
13
|
|
12
14
|
- #101 - Fix stuck queues bug on Redis restart from [@907th](https://github.com/907th).
|
13
15
|
|
@@ -15,8 +17,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
15
17
|
|
16
18
|
This project was taken over by [@deanpcmad](https://github.com/deanpcmad)
|
17
19
|
|
18
|
-
### Changed
|
19
|
-
|
20
20
|
- #120 - Migrate CI to GitHub Actions from [@petergoldstein](https://github.com/petergoldstein).
|
21
21
|
- #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).
|
22
|
+
- #83 - Processing dynamic queues from [@alexey-yanchenko](https://github.com/alexey-yanchenko).
|
@@ -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,6 +61,10 @@ 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
|
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.
|
4
|
+
version: 4.3.0
|
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-08-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sidekiq
|