This repository has been archived on 2024-07-31. You can view files and clone it, but cannot push or open issues or pull requests.
mastodon/app/lib/vacuum/applications_vacuum.rb

11 lines
337 B
Ruby

# frozen_string_literal: true
class Vacuum::ApplicationsVacuum
def perform
Doorkeeper::Application.where(owner_id: nil)
.where.missing(:created_users, :access_tokens, :access_grants)
.where(created_at: ...1.day.ago)
.in_batches.delete_all
end
end