Revision 963a068b lib/jqueue.py
b/lib/jqueue.py | ||
---|---|---|
757 | 757 |
if idx == count - 1: |
758 | 758 |
job.lock_status = None |
759 | 759 |
job.end_timestamp = TimeStampNow() |
760 |
|
|
761 |
# Consistency check |
|
762 |
assert compat.all(i.status == constants.OP_STATUS_SUCCESS |
|
763 |
for i in job.ops) |
|
764 |
|
|
760 | 765 |
queue.UpdateJobUnlocked(job) |
761 | 766 |
finally: |
762 | 767 |
queue.release() |
... | ... | |
780 | 785 |
op.end_timestamp = TimeStampNow() |
781 | 786 |
logging.info("Op %s/%s: Error in opcode %s: %s", |
782 | 787 |
idx + 1, count, op_summary, err) |
788 |
|
|
789 |
to_encode = errors.OpExecError("Preceding opcode failed") |
|
790 |
job.MarkUnfinishedOps(constants.OP_STATUS_ERROR, |
|
791 |
errors.EncodeException(to_encode)) |
|
792 |
|
|
793 |
# Consistency check |
|
794 |
assert compat.all(i.status == constants.OP_STATUS_SUCCESS |
|
795 |
for i in job.ops[:idx]) |
|
796 |
assert compat.all(i.status == constants.OP_STATUS_ERROR and |
|
797 |
errors.GetEncodedError(i.result) |
|
798 |
for i in job.ops[idx:]) |
|
783 | 799 |
finally: |
784 | 800 |
job.lock_status = None |
785 | 801 |
job.end_timestamp = TimeStampNow() |
Also available in: Unified diff