about summary refs log tree commit diff
path: root/app/workers/scheduler/ip_cleanup_scheduler.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2021-06-21 17:07:30 +0200
committerGitHub <noreply@github.com>2021-06-21 17:07:30 +0200
commitd174d12c831989bf1d5d3ca54d4f26d28c2c8925 (patch)
tree9a40d954c9983d6ecbef59c078079a5bd9b26dca /app/workers/scheduler/ip_cleanup_scheduler.rb
parent946200b471685545878cec56e4959dd6b8d50ab8 (diff)
Add authentication history (#16408)
Diffstat (limited to 'app/workers/scheduler/ip_cleanup_scheduler.rb')
-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!