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:
@ -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
|
||||
|
Reference in New Issue
Block a user