Merge commit '887e64efd4abbf3980e008c7a5441b44fbd6c766' into glitch-soc/merge-upstream
This commit is contained in:
commit
cf5d2c3fe4
14 files changed
+79
-39
No files matched your search
@@ -16,7 +16,7 @@ class Scheduler::UserCleanupScheduler
|
||||
private
|
||||
|
||||
def clean_unconfirmed_accounts!
|
||||
User.where('confirmed_at is NULL AND confirmation_sent_at <= ?', UNCONFIRMED_ACCOUNTS_MAX_AGE_DAYS.days.ago).reorder(nil).find_in_batches do |batch|
|
||||
User.unconfirmed.where(confirmation_sent_at: ..UNCONFIRMED_ACCOUNTS_MAX_AGE_DAYS.days.ago).reorder(nil).find_in_batches do |batch|
|
||||
# We have to do it separately because of missing database constraints
|
||||
AccountModerationNote.where(target_account_id: batch.map(&:account_id)).delete_all
|
||||
Account.where(id: batch.map(&:account_id)).delete_all
|
||||
|
||||
Reference in new issue
Block a user