Merge pull request #8432 from SuperTux88/downgrade-sidekiq
Downgrade sidekiq to latest 6.x version
This commit is contained in:
commit
f05d9bac69
4 changed files with 11 additions and 14 deletions
4
Gemfile
4
Gemfile
|
|
@ -42,8 +42,8 @@ gem "simple_captcha2", "0.5.0", require: "simple_captcha"
|
||||||
|
|
||||||
# Background processing
|
# Background processing
|
||||||
|
|
||||||
gem "redis-client", "0.14.1"
|
gem "redis", "4.8.1"
|
||||||
gem "sidekiq", "7.1.2"
|
gem "sidekiq", "6.5.9"
|
||||||
|
|
||||||
# Scheduled processing
|
# Scheduled processing
|
||||||
|
|
||||||
|
|
|
||||||
16
Gemfile.lock
16
Gemfile.lock
|
|
@ -591,8 +591,7 @@ GEM
|
||||||
rb-inotify (0.10.1)
|
rb-inotify (0.10.1)
|
||||||
ffi (~> 1.0)
|
ffi (~> 1.0)
|
||||||
redcarpet (3.6.0)
|
redcarpet (3.6.0)
|
||||||
redis-client (0.14.1)
|
redis (4.8.1)
|
||||||
connection_pool
|
|
||||||
regexp_parser (2.8.1)
|
regexp_parser (2.8.1)
|
||||||
request_store (1.5.1)
|
request_store (1.5.1)
|
||||||
rack (>= 1.4)
|
rack (>= 1.4)
|
||||||
|
|
@ -668,11 +667,10 @@ GEM
|
||||||
secure_headers (6.5.0)
|
secure_headers (6.5.0)
|
||||||
shoulda-matchers (5.3.0)
|
shoulda-matchers (5.3.0)
|
||||||
activesupport (>= 5.2.0)
|
activesupport (>= 5.2.0)
|
||||||
sidekiq (7.1.2)
|
sidekiq (6.5.9)
|
||||||
concurrent-ruby (< 2)
|
connection_pool (>= 2.2.5, < 3)
|
||||||
connection_pool (>= 2.3.0)
|
rack (~> 2.0)
|
||||||
rack (>= 2.2.4)
|
redis (>= 4.5.0, < 5)
|
||||||
redis-client (>= 0.14.0)
|
|
||||||
sidekiq-cron (1.10.1)
|
sidekiq-cron (1.10.1)
|
||||||
fugit (~> 1.8)
|
fugit (~> 1.8)
|
||||||
globalid (>= 1.0.1)
|
globalid (>= 1.0.1)
|
||||||
|
|
@ -868,7 +866,7 @@ DEPENDENCIES
|
||||||
rails-i18n (= 7.0.7)
|
rails-i18n (= 7.0.7)
|
||||||
rails-timeago (= 2.20.0)
|
rails-timeago (= 2.20.0)
|
||||||
redcarpet (= 3.6.0)
|
redcarpet (= 3.6.0)
|
||||||
redis-client (= 0.14.1)
|
redis (= 4.8.1)
|
||||||
responders (= 3.1.0)
|
responders (= 3.1.0)
|
||||||
rqrcode (= 2.2.0)
|
rqrcode (= 2.2.0)
|
||||||
rspec-json_expectations (~> 2.1)
|
rspec-json_expectations (~> 2.1)
|
||||||
|
|
@ -880,7 +878,7 @@ DEPENDENCIES
|
||||||
sassc-rails (= 2.1.2)
|
sassc-rails (= 2.1.2)
|
||||||
secure_headers (= 6.5.0)
|
secure_headers (= 6.5.0)
|
||||||
shoulda-matchers (= 5.3.0)
|
shoulda-matchers (= 5.3.0)
|
||||||
sidekiq (= 7.1.2)
|
sidekiq (= 6.5.9)
|
||||||
sidekiq-cron (= 1.10.1)
|
sidekiq-cron (= 1.10.1)
|
||||||
simple_captcha2 (= 0.5.0)
|
simple_captcha2 (= 0.5.0)
|
||||||
simplecov (= 0.22.0)
|
simplecov (= 0.22.0)
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ module Workers
|
||||||
!(Process.pid.to_s == process_id.split(":")[1] && Thread.current.object_id.to_s(36) == thread_id) &&
|
!(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"])
|
ArchiveBase.subclasses.map(&:to_s).include?(work["payload"]["class"])
|
||||||
end
|
end
|
||||||
rescue RedisClient::CannotConnectError
|
rescue Redis::CannotConnectError
|
||||||
# If code gets to this point and there is no Redis conenction, we're
|
# 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
|
# running in a Test environment and have not mocked Sidekiq::Workers, so
|
||||||
# we're not testing the concurrency-limiting behavior.
|
# we're not testing the concurrency-limiting behavior.
|
||||||
|
|
|
||||||
|
|
@ -128,8 +128,7 @@ if [ -n "$redis_url" ]
|
||||||
then
|
then
|
||||||
redis_param="url: '$redis_url'"
|
redis_param="url: '$redis_url'"
|
||||||
fi
|
fi
|
||||||
echo $redis_param
|
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" ]
|
||||||
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" ]
|
|
||||||
then
|
then
|
||||||
fatal "Can't connect to redis. Please check if it's running and if environment.redis is configured correctly in $CONFIG_FILE."
|
fatal "Can't connect to redis. Please check if it's running and if environment.redis is configured correctly in $CONFIG_FILE."
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue