sidekiq-limit_fetch 4.2.0 → 4.3.2

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: ca583389b5cea0b31200752d2c0dd85a03d38a7ea576c9a299a99367a1c8086d
4
+ data.tar.gz: 335f49aac1d3ee9128a3c92eb88a25010d906a8b8d8701d1a79b1e41349ca256
5
5
  SHA512:
6
- metadata.gz: cdac031f971700a4b8ec4ef05e3808569bb4342df709222eab4cfbb38a2390c1458d4d10da51b89e46dd2571f64f0ec9e5ac0c4479109099f4e97131ce2ea8d2
7
- data.tar.gz: 4c2d3df1c1c88ac9ade864968d5692b3196d53d1a69d17458d6bdde92edb9a2b089a7ffd7777eacb3f6e27e418e6cd5aebc82dbf9faa2a3eb8ebb3ca0d7b71b0
6
+ metadata.gz: 00daee076b583097d361fed04a7128188af6d8a287906a644d0449c01dd8748fd4b8b9d233eddfe1f1da22d0492626088f11e4eb9785dd31da75a47c57437726
7
+ data.tar.gz: 110b867205d0aea423ec63d8e010d5d1b75398b5aefce782fdb2320fd5e6114b10d041f59306fadb650d3401ea6a8c2fd962a6fd80d793162d8d14061c510e66
data/CHANGELOG.md CHANGED
@@ -1,13 +1,23 @@
1
1
  # Changelog
2
2
 
3
- All notable changes to this project will be documented in this file.
3
+ ## [4.3.2] - 2022-09-01
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
+ - #139 - Fix Redis deprecation warnings from [@adamzapasnik](https://github.com/adamzapasnik)
7
6
 
8
- ## [4.1.0] - 2022-03-29
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
- ### Changed
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).
@@ -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.2)
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.21
@@ -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.2)
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.21
@@ -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.2)
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.21
@@ -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.2)
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.21
@@ -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.2)
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.21
@@ -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.2)
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.5
53
+ 2.3.21
@@ -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.2)
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.21
@@ -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
- 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,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
@@ -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.2'
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.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-06-09 00:00:00.000000000 Z
12
+ date: 2022-09-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sidekiq