1
0

applications_vacuum.rb 337 B

12345678910
  1. # frozen_string_literal: true
  2. class Vacuum::ApplicationsVacuum
  3. def perform
  4. Doorkeeper::Application.where(owner_id: nil)
  5. .where.missing(:created_users, :access_tokens, :access_grants)
  6. .where(created_at: ...1.day.ago)
  7. .in_batches.delete_all
  8. end
  9. end