Fix errors with searching for and retrying jobs on the /jobs page caused by the upgrade to GoodJob 3.0.
9 lines
241 B
Ruby
9 lines
241 B
Ruby
# frozen_string_literal: true
|
|
|
|
# A job that runs daily to delete all stale jobs. Spawned by {DanbooruMaintenance}.
|
|
class PruneJobsJob < ApplicationJob
|
|
def perform
|
|
BackgroundJob.where("created_at < ?", 7.days.ago).destroy_all
|
|
end
|
|
end
|