Skip to content

Commit

Permalink
Fix broken CI against Sidekiq 7.2
Browse files Browse the repository at this point in the history
The API of Redis commands via Sidekiq was changed at Sidekiq 7.2.
This PR fixes to use the new style.

Ref: sidekiq/sidekiq#6083 sidekiq/sidekiq@3b8a3c3
  • Loading branch information
y-yagi authored and marcelolx committed Feb 12, 2024
1 parent 76beae3 commit 6f1a07a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion spec/support/initialization/redis.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

RSpec.configure do |config|
config.before do
Sidekiq.redis { |r| r.flushdb(async: true) }
if Sidekiq::VERSION >= '7.2'
Sidekiq.redis { |r| r.flushdb('async') }
else
Sidekiq.redis { |r| r.flushdb(async: true) }
end
end
end

0 comments on commit 6f1a07a

Please sign in to comment.