about summary refs log tree commit diff
path: root/app/workers
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2021-06-23 10:46:24 +0200
committerClaire <claire.github-309c@sitedethib.com>2021-06-23 10:46:24 +0200
commit37fd9670a586af057d12c3f789c0701ae074314f (patch)
treecc979a0bc830a9cc0c4e0d8beb90c487578dd522 /app/workers
parenta434f370f38ac66e05000545e36d7c696f4962d0 (diff)
parent63b807cffcba0579efdf2f4ed4a2deb93af4850b (diff)
Merge branch 'main' into glitch-soc/merge-upstream
Diffstat (limited to 'app/workers')
-rw-r--r--app/workers/scheduler/ip_cleanup_scheduler.rb1
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!