Commit 45df0793 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Fix assertion error on unclean master shutdown

Commit 66bd7445

 added an assertion to ensure a finalized job has its
“end_timestamp” attribute set. Unfortunately it didn't cover a case when
the queue is recovering from an unclean master shutdown.
Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent fdfe88b1
...@@ -1332,6 +1332,7 @@ class JobQueue(object): ...@@ -1332,6 +1332,7 @@ class JobQueue(object):
else: else:
job.MarkUnfinishedOps(constants.OP_STATUS_ERROR, job.MarkUnfinishedOps(constants.OP_STATUS_ERROR,
"Unclean master daemon shutdown") "Unclean master daemon shutdown")
job.Finalize()
self.UpdateJobUnlocked(job) self.UpdateJobUnlocked(job)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment