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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0d18f2af7e57af75a611a37e2e0034bf872b08e88fbbd26c43ef116a52a1a0b3
4
- data.tar.gz: b1bd773b0cf440236fa0fe9a1533d2a50269d6c4173d39b4acf84b2959e6821f
3
+ metadata.gz: 1e1c022a896ec81cb597f174e844fae80fc2c3c642fbf0872d87c00b0651a378
4
+ data.tar.gz: b80c13c01232fac37df35c85353974eed389d353fd84c842d368e844a350a8b9
5
5
  SHA512:
6
- metadata.gz: cdac031f971700a4b8ec4ef05e3808569bb4342df709222eab4cfbb38a2390c1458d4d10da51b89e46dd2571f64f0ec9e5ac0c4479109099f4e97131ce2ea8d2
7
- data.tar.gz: 4c2d3df1c1c88ac9ade864968d5692b3196d53d1a69d17458d6bdde92edb9a2b089a7ffd7777eacb3f6e27e418e6cd5aebc82dbf9faa2a3eb8ebb3ca0d7b71b0
6
+ metadata.gz: 2c4e5565fff18225cf65f1ef86ace76375fa7c36cd895a132e19ad06d02ba50e3cecfc34d961fa9183374257895b3fb49300d7cda7eeb9bd8875b2e0baac6cc1
7
+ data.tar.gz: 550341eeafa2a83bc5236223148ca0ffcab8774f4ebcf6832386d7fe0a07e6f7176c5feb8e3c79db333ee5aed6fedf6f6a16124b39e45aab83ded720922e071a
data/CHANGELOG.md CHANGED
@@ -1,13 +1,15 @@
1
1
  # Changelog
2
2
 
3
- All notable changes to this project will be documented in this file.
3
+ ## [4.3.0] - 2022-08-16
4
4
 
5
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
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.1.0] - 2022-03-29
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
- ### Changed
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,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- sidekiq-limit_fetch (4.1.0)
4
+ sidekiq-limit_fetch (4.3.0)
5
5
  redis (>= 4.6.0)
6
6
  sidekiq (>= 4)
7
7
 
@@ -53,4 +53,4 @@ DEPENDENCIES
53
53
  sidekiq-limit_fetch!
54
54
 
55
55
  BUNDLED WITH
56
- 2.3.14
56
+ 2.3.5
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- sidekiq-limit_fetch (4.1.0)
4
+ sidekiq-limit_fetch (4.3.0)
5
5
  redis (>= 4.6.0)
6
6
  sidekiq (>= 4)
7
7
 
@@ -50,4 +50,4 @@ DEPENDENCIES
50
50
  sidekiq-limit_fetch!
51
51
 
52
52
  BUNDLED WITH
53
- 2.3.14
53
+ 2.3.5
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- sidekiq-limit_fetch (4.1.0)
4
+ sidekiq-limit_fetch (4.3.0)
5
5
  redis (>= 4.6.0)
6
6
  sidekiq (>= 4)
7
7
 
@@ -50,4 +50,4 @@ DEPENDENCIES
50
50
  sidekiq-limit_fetch!
51
51
 
52
52
  BUNDLED WITH
53
- 2.3.14
53
+ 2.3.5
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- sidekiq-limit_fetch (4.1.0)
4
+ sidekiq-limit_fetch (4.3.0)
5
5
  redis (>= 4.6.0)
6
6
  sidekiq (>= 4)
7
7
 
@@ -50,4 +50,4 @@ DEPENDENCIES
50
50
  sidekiq-limit_fetch!
51
51
 
52
52
  BUNDLED WITH
53
- 2.3.14
53
+ 2.3.5
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- sidekiq-limit_fetch (4.1.0)
4
+ sidekiq-limit_fetch (4.3.0)
5
5
  redis (>= 4.6.0)
6
6
  sidekiq (>= 4)
7
7
 
@@ -50,4 +50,4 @@ DEPENDENCIES
50
50
  sidekiq-limit_fetch!
51
51
 
52
52
  BUNDLED WITH
53
- 2.3.14
53
+ 2.3.5
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- sidekiq-limit_fetch (4.1.0)
4
+ sidekiq-limit_fetch (4.3.0)
5
5
  redis (>= 4.6.0)
6
6
  sidekiq (>= 4)
7
7
 
@@ -10,7 +10,7 @@ GIT
10
10
  PATH
11
11
  remote: ..
12
12
  specs:
13
- sidekiq-limit_fetch (4.1.0)
13
+ sidekiq-limit_fetch (4.3.0)
14
14
  redis (>= 4.6.0)
15
15
  sidekiq (>= 4)
16
16
 
@@ -55,4 +55,4 @@ DEPENDENCIES
55
55
  sidekiq-limit_fetch!
56
56
 
57
57
  BUNDLED WITH
58
- 2.3.14
58
+ 2.3.5
@@ -1,7 +1,11 @@
1
1
  module Sidekiq
2
2
  class LimitFetch::UnitOfWork < BasicFetch::UnitOfWork
3
3
  def initialize(queue, job)
4
- super
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
@@ -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(Sidekiq.options).bulk_requeue(*args)
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
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = 'sidekiq-limit_fetch'
3
- gem.version = '4.2.0'
3
+ gem.version = '4.3.0'
4
4
  gem.license = 'MIT'
5
5
  gem.authors = ['Dean Perry', 'brainopia']
6
6
  gem.email = 'dean@deanpcmad.com'
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.0
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-06-09 00:00:00.000000000 Z
12
+ date: 2022-08-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sidekiq