jobs: fix failures in /jobs controller.

Fix errors with searching for and retrying jobs on the /jobs page caused
by the upgrade to GoodJob 3.0.
This commit is contained in:
evazion
2022-08-23 17:27:23 -05:00
parent df2d13d42e
commit c8917684b8
4 changed files with 14 additions and 11 deletions

View File

@@ -3,6 +3,6 @@
# A job that runs daily to delete all stale jobs. Spawned by {DanbooruMaintenance}.
class PruneJobsJob < ApplicationJob
def perform
GoodJob::ActiveJobJob.where("created_at < ?", 7.days.ago).destroy_all
BackgroundJob.where("created_at < ?", 7.days.ago).destroy_all
end
end