diff --git a/Gemfile b/Gemfile index b803c5488..2e2851f52 100644 --- a/Gemfile +++ b/Gemfile @@ -42,8 +42,8 @@ gem "simple_captcha2", "0.5.0", require: "simple_captcha" # Background processing -gem "redis-client", "0.14.1" -gem "sidekiq", "7.1.2" +gem "redis", "4.8.1" +gem "sidekiq", "6.5.9" # Scheduled processing diff --git a/Gemfile.lock b/Gemfile.lock index 8c42eeda0..316728826 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -591,8 +591,7 @@ GEM rb-inotify (0.10.1) ffi (~> 1.0) redcarpet (3.6.0) - redis-client (0.14.1) - connection_pool + redis (4.8.1) regexp_parser (2.8.1) request_store (1.5.1) rack (>= 1.4) @@ -668,11 +667,10 @@ GEM secure_headers (6.5.0) shoulda-matchers (5.3.0) activesupport (>= 5.2.0) - sidekiq (7.1.2) - concurrent-ruby (< 2) - connection_pool (>= 2.3.0) - rack (>= 2.2.4) - redis-client (>= 0.14.0) + sidekiq (6.5.9) + connection_pool (>= 2.2.5, < 3) + rack (~> 2.0) + redis (>= 4.5.0, < 5) sidekiq-cron (1.10.1) fugit (~> 1.8) globalid (>= 1.0.1) @@ -868,7 +866,7 @@ DEPENDENCIES rails-i18n (= 7.0.7) rails-timeago (= 2.20.0) redcarpet (= 3.6.0) - redis-client (= 0.14.1) + redis (= 4.8.1) responders (= 3.1.0) rqrcode (= 2.2.0) rspec-json_expectations (~> 2.1) @@ -880,7 +878,7 @@ DEPENDENCIES sassc-rails (= 2.1.2) secure_headers (= 6.5.0) shoulda-matchers (= 5.3.0) - sidekiq (= 7.1.2) + sidekiq (= 6.5.9) sidekiq-cron (= 1.10.1) simple_captcha2 (= 0.5.0) simplecov (= 0.22.0) diff --git a/app/workers/archive_base.rb b/app/workers/archive_base.rb index b6b2001e7..6b8b38a82 100644 --- a/app/workers/archive_base.rb +++ b/app/workers/archive_base.rb @@ -31,7 +31,7 @@ module Workers !(Process.pid.to_s == process_id.split(":")[1] && Thread.current.object_id.to_s(36) == thread_id) && ArchiveBase.subclasses.map(&:to_s).include?(work["payload"]["class"]) end - rescue RedisClient::CannotConnectError + rescue Redis::CannotConnectError # If code gets to this point and there is no Redis conenction, we're # running in a Test environment and have not mocked Sidekiq::Workers, so # we're not testing the concurrency-limiting behavior. diff --git a/script/server b/script/server index af68b8f18..aee6cf4f5 100755 --- a/script/server +++ b/script/server @@ -128,8 +128,7 @@ if [ -n "$redis_url" ] then redis_param="url: '$redis_url'" fi -echo $redis_param -if [ "$(bin/bundle exec ruby -e "require 'redis-client'; puts RedisClient.config($redis_param).new_client.call('PING')" 2> /dev/null | grep -vE "is not writable|as your home directory temporarily" )" != "PONG" ] +if [ "$(bin/bundle exec ruby -e "require 'redis'; puts Redis.new($redis_param).ping" 2> /dev/null | grep -vE "is not writable|as your home directory temporarily" )" != "PONG" ] then fatal "Can't connect to redis. Please check if it's running and if environment.redis is configured correctly in $CONFIG_FILE." fi