mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-25 17:51:36 +01:00
11 lines
337 B
Ruby
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
|