Revision e35344b4 lib/jqueue.py
b/lib/jqueue.py | ||
---|---|---|
438 | 438 |
|
439 | 439 |
# Cancel here if we were asked to |
440 | 440 |
if self._op.status == constants.OP_STATUS_CANCELING: |
441 |
logging.debug("Canceling opcode") |
|
441 | 442 |
raise CancelJob() |
442 | 443 |
|
444 |
logging.debug("Opcode is now running") |
|
443 | 445 |
self._op.status = constants.OP_STATUS_RUNNING |
444 | 446 |
self._op.exec_timestamp = TimeStampNow() |
445 | 447 |
|
... | ... | |
713 | 715 |
queue.acquire(shared=1) |
714 | 716 |
try: |
715 | 717 |
if op.status == constants.OP_STATUS_CANCELED: |
718 |
logging.debug("Canceling opcode") |
|
716 | 719 |
raise CancelJob() |
717 | 720 |
assert op.status == constants.OP_STATUS_QUEUED |
721 |
logging.debug("Opcode %s/%s waiting for locks", |
|
722 |
idx + 1, count) |
|
718 | 723 |
op.status = constants.OP_STATUS_WAITLOCK |
719 | 724 |
op.result = None |
720 | 725 |
op.start_timestamp = TimeStampNow() |
... | ... | |
732 | 737 |
|
733 | 738 |
queue.acquire(shared=1) |
734 | 739 |
try: |
740 |
logging.debug("Opcode %s/%s succeeded", idx + 1, count) |
|
735 | 741 |
op.status = constants.OP_STATUS_SUCCESS |
736 | 742 |
op.result = result |
737 | 743 |
op.end_timestamp = TimeStampNow() |
... | ... | |
748 | 754 |
queue.acquire(shared=1) |
749 | 755 |
try: |
750 | 756 |
try: |
757 |
logging.debug("Opcode %s/%s failed", idx + 1, count) |
|
751 | 758 |
op.status = constants.OP_STATUS_ERROR |
752 | 759 |
if isinstance(err, errors.GenericError): |
753 | 760 |
to_encode = err |
... | ... | |
1025 | 1032 |
names and the second one with the node addresses |
1026 | 1033 |
|
1027 | 1034 |
""" |
1035 |
# TODO: Change to "tuple(map(list, zip(*self._nodes.items())))"? |
|
1028 | 1036 |
name_list = self._nodes.keys() |
1029 | 1037 |
addr_list = [self._nodes[name] for name in name_list] |
1030 | 1038 |
return name_list, addr_list |
Also available in: Unified diff