about summary refs log tree commit diff
path: root/app/workers/scheduler
diff options
context:
space:
mode:
authorStarfall <us@starfall.systems>2021-07-07 11:46:33 -0500
committerStarfall <us@starfall.systems>2021-07-07 11:46:33 -0500
commitd30025d28d813999bfe98ce9cee2cda3bebf6c22 (patch)
treee2cf70344fc6426f3a2c778d3b6d3bab9e22c078 /app/workers/scheduler
parentfadb06ef6e1950a82f08673683e705943b93ba40 (diff)
parent0c2eb949fc21ceecbd99a81e5ffe75517a1e64df (diff)
Merge branch 'glitch'
Diffstat (limited to 'app/workers/scheduler')
-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!