0
0
Fork 0

Fix single Redis connection being used across all threads (#18135)

* Fix single Redis connection being used across all Sidekiq threads

* Fix tests
This commit is contained in:
Eugen Rochko 2022-04-28 17:47:34 +02:00 committed by GitHub
parent 9bf04db23a
commit 3917353645
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
44 changed files with 243 additions and 124 deletions

View file

@ -12,7 +12,7 @@ RSpec.describe MuteService, type: :service do
let(:home_timeline_key) { FeedManager.instance.key(:home, account.id) }
before do
Redis.current.del(home_timeline_key)
redis.del(home_timeline_key)
end
it "clears account's statuses" do
@ -20,7 +20,7 @@ RSpec.describe MuteService, type: :service do
FeedManager.instance.push_to_home(account, other_account_status)
expect { subject }.to change {
Redis.current.zrange(home_timeline_key, 0, -1)
redis.zrange(home_timeline_key, 0, -1)
}.from([status.id.to_s, other_account_status.id.to_s]).to([other_account_status.id.to_s])
end
end