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
|
@ -2,12 +2,13 @@
|
|||
|
||||
class MergeWorker
|
||||
include Sidekiq::Worker
|
||||
include Redisable
|
||||
|
||||
def perform(from_account_id, into_account_id)
|
||||
FeedManager.instance.merge_into_home(Account.find(from_account_id), Account.find(into_account_id))
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
true
|
||||
ensure
|
||||
Redis.current.del("account:#{into_account_id}:regeneration")
|
||||
redis.del("account:#{into_account_id}:regeneration")
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue