Files
danbooru/app/jobs/prune_delayed_jobs_job.rb
evazion a7dc05ce63 Enable frozen string literals.
Make all string literals immutable by default.
2021-12-14 21:33:27 -06:00

10 lines
257 B
Ruby

# frozen_string_literal: true
# A job that runs daily to delete all stale delayed jobs. Spawned by
# {DanbooruMaintenance}.
class PruneDelayedJobsJob < ApplicationJob
def perform
Delayed::Job.where("created_at < ?", 45.days.ago).delete_all
end
end