Compare commits

...

7 Commits

Author SHA1 Message Date
Dean Perry 9bf29b2484
Use OpenSSL::Digest where possible 2022-09-28 09:03:39 +01:00
Dean Perry 30015f74f8 4.3.2 2022-09-01 10:40:27 +01:00
Dean Perry 7dbda32218
Merge pull request #139 from adamzapasnik/fix-deprecation-warnings
Fix deprecation warnings
2022-09-01 10:35:21 +01:00
Adam Zapaśnik aba250cfe2 Fix deprecation warnings
Based on 09dacfed8f
2022-08-31 11:23:45 +02:00
Dean Perry c7e6cac368 v4.3.1 2022-08-23 21:35:01 +00:00
Dean Perry 95f2211de5
Merge pull request #137 from cgunther/brpop-timeout
Fix deprecation of passing timeout as positional argument to brpop
2022-08-23 22:30:35 +01:00
Chris Gunther 3147c284aa Fix deprecation of passing timeout as positional argument to brpop
The recent v4.8.0 of the redis gem deprecated passing `timeout` as a
positional argument in blocking commands like `brpop`:
08eea74248

v4.6 or greater of the redis gem is currently required and it already
included support for a `:timeout` hash option:
https://github.com/redis/redis-rb/blob/v4.6.0/lib/redis/distributed.rb#L465

Therefore we can switch to passing the timeout as a hash option.

Fixes #136.
2022-08-23 16:21:38 -04:00
12 changed files with 28 additions and 20 deletions

View File

@ -1,5 +1,13 @@
# Changelog
## [4.3.2] - 2022-09-01
- #139 - Fix Redis deprecation warnings from [@adamzapasnik](https://github.com/adamzapasnik)
## [4.3.1] - 2022-08-23
- #137 - Fix deprecation of passing timeout as positional argument to brpop from [@cgunther](https://github.com/cgunther)
## [4.3.0] - 2022-08-16
- #135 - Some extra fixes for Sidekiq 6.5 (fixes #128, #130, #131) from [@BobbyMcWho](https://github.com/BobbyMcWho)

View File

@ -1,7 +1,7 @@
PATH
remote: ..
specs:
sidekiq-limit_fetch (4.3.0)
sidekiq-limit_fetch (4.3.2)
redis (>= 4.6.0)
sidekiq (>= 4)
@ -53,4 +53,4 @@ DEPENDENCIES
sidekiq-limit_fetch!
BUNDLED WITH
2.3.5
2.3.21

View File

@ -1,7 +1,7 @@
PATH
remote: ..
specs:
sidekiq-limit_fetch (4.3.0)
sidekiq-limit_fetch (4.3.2)
redis (>= 4.6.0)
sidekiq (>= 4)
@ -50,4 +50,4 @@ DEPENDENCIES
sidekiq-limit_fetch!
BUNDLED WITH
2.3.5
2.3.21

View File

@ -1,7 +1,7 @@
PATH
remote: ..
specs:
sidekiq-limit_fetch (4.3.0)
sidekiq-limit_fetch (4.3.2)
redis (>= 4.6.0)
sidekiq (>= 4)
@ -50,4 +50,4 @@ DEPENDENCIES
sidekiq-limit_fetch!
BUNDLED WITH
2.3.5
2.3.21

View File

@ -1,7 +1,7 @@
PATH
remote: ..
specs:
sidekiq-limit_fetch (4.3.0)
sidekiq-limit_fetch (4.3.2)
redis (>= 4.6.0)
sidekiq (>= 4)
@ -50,4 +50,4 @@ DEPENDENCIES
sidekiq-limit_fetch!
BUNDLED WITH
2.3.5
2.3.21

View File

@ -1,7 +1,7 @@
PATH
remote: ..
specs:
sidekiq-limit_fetch (4.3.0)
sidekiq-limit_fetch (4.3.2)
redis (>= 4.6.0)
sidekiq (>= 4)
@ -50,4 +50,4 @@ DEPENDENCIES
sidekiq-limit_fetch!
BUNDLED WITH
2.3.5
2.3.21

View File

@ -1,7 +1,7 @@
PATH
remote: ..
specs:
sidekiq-limit_fetch (4.3.0)
sidekiq-limit_fetch (4.3.2)
redis (>= 4.6.0)
sidekiq (>= 4)
@ -50,4 +50,4 @@ DEPENDENCIES
sidekiq-limit_fetch!
BUNDLED WITH
2.3.5
2.3.21

View File

@ -10,7 +10,7 @@ GIT
PATH
remote: ..
specs:
sidekiq-limit_fetch (4.3.0)
sidekiq-limit_fetch (4.3.2)
redis (>= 4.6.0)
sidekiq (>= 4)
@ -55,4 +55,4 @@ DEPENDENCIES
sidekiq-limit_fetch!
BUNDLED WITH
2.3.5
2.3.21

View File

@ -70,7 +70,7 @@ module Sidekiq::LimitFetch
sleep TIMEOUT # there are no queues to handle, so lets sleep
[] # and return nothing
else
redis_retryable { Sidekiq.redis { |it| it.brpop *queues, TIMEOUT } }
redis_retryable { Sidekiq.redis { |it| it.brpop *queues, timeout: TIMEOUT } }
end
end
end

View File

@ -33,7 +33,7 @@ module Sidekiq::LimitFetch::Global
def remove_old_processes!
Sidekiq.redis do |it|
old_processes.each {|process| it.srem PROCESS_SET, process }
old_processes.each {|process| it.srem PROCESS_SET, [process] }
end
end
@ -48,7 +48,7 @@ module Sidekiq::LimitFetch::Global
Sidekiq.redis do |it|
it.multi do |pipeline|
pipeline.set heartbeat_key, true
pipeline.sadd PROCESS_SET, Selector.uuid
pipeline.sadd PROCESS_SET, [Selector.uuid]
pipeline.expire heartbeat_key, ttl
end
end

View File

@ -34,11 +34,11 @@ module Sidekiq::LimitFetch::Global
end
def redis_acquire_sha
@acquire_sha ||= Digest::SHA1.hexdigest redis_acquire_script
@acquire_sha ||= OpenSSL::Digest::SHA1.hexdigest redis_acquire_script
end
def redis_release_sha
@release_sha ||= Digest::SHA1.hexdigest redis_release_script
@release_sha ||= OpenSSL::Digest::SHA1.hexdigest redis_release_script
end
def redis_acquire_script

View File

@ -1,6 +1,6 @@
Gem::Specification.new do |gem|
gem.name = 'sidekiq-limit_fetch'
gem.version = '4.3.0'
gem.version = '4.3.2'
gem.license = 'MIT'
gem.authors = ['Dean Perry', 'brainopia']
gem.email = 'dean@deanpcmad.com'