From 545482650b21c591c66910617326826880e12462 Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Tue, 6 Sep 2022 22:23:50 +0200 Subject: [PATCH] Update redis and resque Fix: https://github.com/rails/rails/issues/45913 --- Gemfile | 2 +- Gemfile.lock | 16 ++++++++-------- .../test/support/integration/adapters/resque.rb | 2 +- .../test/support/integration/adapters/sidekiq.rb | 1 + 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/Gemfile b/Gemfile index de2df269d40..245e8bf658a 100644 --- a/Gemfile +++ b/Gemfile @@ -82,7 +82,7 @@ end group :cable do gem "puma", require: false - gem "redis", ">= 4.0.1", "< 5", require: false + gem "redis", ">= 4.0.1", require: false gem "redis-namespace" diff --git a/Gemfile.lock b/Gemfile.lock index 10ec76ff6aa..80285515eda 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -398,7 +398,10 @@ GEM rbtree (0.4.5) rdoc (6.3.3) redcarpet (3.2.3) - redis (4.7.1) + redis (5.0.3) + redis-client (>= 0.7.4) + redis-client (0.7.4) + connection_pool redis-namespace (1.8.1) redis (>= 3.0.4) regexp_parser (2.2.1) @@ -408,12 +411,11 @@ GEM declarative (< 0.1.0) trailblazer-option (>= 0.1.1, < 0.2.0) uber (< 0.2.0) - resque (2.2.0) + resque (2.4.0) mono_logger (~> 1.0) multi_json (~> 1.0) redis-namespace (~> 1.6) sinatra (>= 0.9.2) - vegas (~> 0.1.2) resque-scheduler (4.5.0) mono_logger (~> 1.0) redis (>= 3.3) @@ -461,10 +463,10 @@ GEM serverengine (2.0.7) sigdump (~> 0.2.2) set (1.0.2) - sidekiq (6.3.1) + sidekiq (6.5.5) connection_pool (>= 2.2.2) rack (~> 2.0) - redis (>= 4.2.0) + redis (>= 4.5.0) sigdump (0.2.4) signet (0.16.0) addressable (~> 2.8) @@ -524,8 +526,6 @@ GEM uber (0.1.0) unicode-display_width (2.1.0) useragent (0.16.10) - vegas (0.1.11) - rack (>= 1.0.0) w3c_validators (1.3.6) json (>= 1.8) nokogiri (~> 1.6) @@ -596,7 +596,7 @@ DEPENDENCIES rails! rake (>= 11.1) redcarpet (~> 3.2.3) - redis (>= 4.0.1, < 5) + redis (>= 4.0.1) redis-namespace resque resque-scheduler diff --git a/activejob/test/support/integration/adapters/resque.rb b/activejob/test/support/integration/adapters/resque.rb index cd129e72b2c..20040b35671 100644 --- a/activejob/test/support/integration/adapters/resque.rb +++ b/activejob/test/support/integration/adapters/resque.rb @@ -3,7 +3,7 @@ module ResqueJobsManager def setup ActiveJob::Base.queue_adapter = :resque - Resque.redis = Redis::Namespace.new "active_jobs_int_test", redis: Redis.new(url: ENV["REDIS_URL"] || "redis://127.0.0.1:6379/12", thread_safe: true) + Resque.redis = Redis::Namespace.new "active_jobs_int_test", redis: Redis.new(url: ENV["REDIS_URL"] || "redis://127.0.0.1:6379/12") Resque.logger = Rails.logger unless can_run? puts "Cannot run integration tests for resque. To be able to run integration tests for resque you need to install and start redis.\n" diff --git a/activejob/test/support/integration/adapters/sidekiq.rb b/activejob/test/support/integration/adapters/sidekiq.rb index 775c588d73e..e720b15d750 100644 --- a/activejob/test/support/integration/adapters/sidekiq.rb +++ b/activejob/test/support/integration/adapters/sidekiq.rb @@ -25,6 +25,7 @@ module SidekiqJobsManager death_read, death_write = IO.pipe @pid = fork do + Sidekiq.redis_pool.reload(&:close) continue_read.close death_write.close