If Delayed::Job fails to deserialize a job it throws DeserializationError
. This happens early in the process and the hook lifecycle.around(:invoke_job, &Delayed::invoke_job_callback)
is not called.
Looking at the code it is rescued here https://github.com/collectiveidea/delayed_job/blob/1e679174b513dc711f7d764c8bd9d4f5c6495276/lib/delayed/worker.rb#L235-L237 and the only hook it calls is "failure".
Do you have any idea how we can account correctly for this case?