diff options
author | Claire <claire.github-309c@sitedethib.com> | 2021-06-23 12:49:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-23 12:49:09 +0200 |
commit | 776e00f19399875a135a64d8ad486f3578101cf9 (patch) | |
tree | ea846e21767b1cb2f9f277d3829fbade1f0e46a0 /app/workers | |
parent | a434f370f38ac66e05000545e36d7c696f4962d0 (diff) | |
parent | 979059fbc93664b38b720b369b31beaa89457879 (diff) |
Merge pull request #1551 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/scheduler/ip_cleanup_scheduler.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/workers/scheduler/ip_cleanup_scheduler.rb b/app/workers/scheduler/ip_cleanup_scheduler.rb index df7e6ad56..918c10ac9 100644 --- a/app/workers/scheduler/ip_cleanup_scheduler.rb +++ b/app/workers/scheduler/ip_cleanup_scheduler.rb @@ -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! |