Merge branch 'main' into glitch-soc/merge-upstream

This commit is contained in:
Claire
2021-06-23 10:46:24 +02:00
25 changed files with 762 additions and 677 deletions

View File

@@ -17,6 +17,7 @@ class Scheduler::IpCleanupScheduler
def clean_ip_columns!
SessionActivation.where('updated_at < ?', IP_RETENTION_PERIOD.ago).in_batches.destroy_all
User.where('current_sign_in_at < ?', IP_RETENTION_PERIOD.ago).in_batches.update_all(last_sign_in_ip: nil, current_sign_in_ip: nil, sign_up_ip: nil)
LoginActivity.where('created_at < ?', IP_RETENTION_PERIOD.ago).in_batches.destroy_all
end
def clean_expired_ip_blocks!