Add notifications for statuses deleted by moderators (#17204)
This commit is contained in:
parent
d5c9feb7b7
commit
14f436c457
59 changed files with 1220 additions and 598 deletions
|
@ -8,6 +8,7 @@ class Scheduler::UserCleanupScheduler
|
|||
def perform
|
||||
clean_unconfirmed_accounts!
|
||||
clean_suspended_accounts!
|
||||
clean_discarded_statuses!
|
||||
end
|
||||
|
||||
private
|
||||
|
@ -24,4 +25,12 @@ class Scheduler::UserCleanupScheduler
|
|||
Admin::AccountDeletionWorker.perform_async(deletion_request.account_id)
|
||||
end
|
||||
end
|
||||
|
||||
def clean_discarded_statuses!
|
||||
Status.discarded.where('deleted_at <= ?', 30.days.ago).find_in_batches do |statuses|
|
||||
RemovalWorker.push_bulk(statuses) do |status|
|
||||
[status.id, { immediate: true }]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue