Closed
Description
As the title says. The job arguments are serialized by ActiveJob to something the database understands but the same is not true for the concurrency key.
class ExampleJob < ApplicationJob
include GoodJob::ActiveJobExtensions::Concurrency
good_job_control_concurrency_with(total_limit: 1, key: -> { arguments.first })
def perform(arg)
end
end
Job.new.perform({a: "test"})
# => All good
Job.perform_later({a: "test"})
# => Failed enqueuing Job to GoodJob(queue): TypeError (can't cast Hash)
Not sure if what I was trying to do should even be supported, but the error message I get as a result of doing this is not very clear and lead me to believe that the issues was with the parameters I was passing to the job.
Edit: Updated the issue description after figuring out what was actually going on.
Metadata
Assignees
Labels
No labels
Projects
Status
Done
Activity