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:
parent
9bf04db23a
commit
3917353645
44 changed files with 243 additions and 124 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue