core/job: use new job ID when we failed to deserialize job ID
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 26 Apr 2023 05:39:56 +0000 (14:39 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 26 Apr 2023 15:36:41 +0000 (00:36 +0900)
commitaafb96d5146c70ac30f2b5c677cd22fd43abd62c
tree1169f18b30b4ccbc8530aebd85aa5d4e137c2dd2
parent3e1aec303646c37e7a7c74b45ef8cc90e3bf3531
core/job: use new job ID when we failed to deserialize job ID

This is for the case when we fail to deserialize job ID.
In job_install_deserialized(), we also check the job type, and that is
for the case when we failed to deserialize the job.
Let's gracefully handle the failure in deserializing the job ID.
This is paranoia, and just for safety. Should not change any behavior.
src/core/job.c