Files
danbooru/test/factories/good_job.rb
evazion c8917684b8 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.
2022-08-23 18:07:04 -05:00

16 lines
347 B
Ruby

FactoryBot.define do
factory :good_job, class: GoodJob::Job do
transient do
job { VacuumDatabaseJob.new }
end
id { SecureRandom.uuid }
active_job_id { job.job_id }
queue_name { job.queue_name }
priority { job.priority }
serialized_params do
{ job_class: job.class.name, **job.as_json }
end
end
end