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
|
@ -13,7 +13,7 @@ RSpec.describe PrecomputeFeedService, type: :service do
|
|||
|
||||
subject.call(account)
|
||||
|
||||
expect(Redis.current.zscore(FeedManager.instance.key(:home, account.id), status.id)).to be_within(0.1).of(status.id.to_f)
|
||||
expect(redis.zscore(FeedManager.instance.key(:home, account.id), status.id)).to be_within(0.1).of(status.id.to_f)
|
||||
end
|
||||
|
||||
it 'does not raise an error even if it could not find any status' do
|
||||
|
@ -30,7 +30,7 @@ RSpec.describe PrecomputeFeedService, type: :service do
|
|||
|
||||
subject.call(account)
|
||||
|
||||
expect(Redis.current.zscore(FeedManager.instance.key(:home, account.id), reblog.id)).to eq nil
|
||||
expect(redis.zscore(FeedManager.instance.key(:home, account.id), reblog.id)).to eq nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue