0
0
Fork 0

Change lists to reflect added and removed users retroactively (#32930)

This commit is contained in:
Eugen Rochko 2024-11-19 11:04:12 +01:00 committed by GitHub
parent f2976ec9a4
commit 2b5faa2ba3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 157 additions and 25 deletions

View file

@ -2,9 +2,18 @@
class MuteWorker
include Sidekiq::Worker
include DatabaseHelper
def perform(account_id, target_account_id)
FeedManager.instance.clear_from_home(Account.find(account_id), Account.find(target_account_id))
with_primary do
@account = Account.find(account_id)
@target_account = Account.find(target_account_id)
end
with_read_replica do
FeedManager.instance.clear_from_home(@account, @target_account)
FeedManager.instance.clear_from_lists(@account, @target_account)
end
rescue ActiveRecord::RecordNotFound
true
end