Skip to content

Commit be8ffa6

Browse files
committed
[batch] Join job_groups_self_and_ancestors to determine if job has been cancelled
1 parent 62efb32 commit be8ffa6

File tree

3 files changed

+544
-1
lines changed

3 files changed

+544
-1
lines changed

batch/batch/worker/worker.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3382,7 +3382,19 @@ async def post_job_complete_1(self, job: Job, full_status):
33823382
delay_secs = min(delay_secs * 2, 2 * 60.0)
33833383

33843384
async def post_job_complete(self, job, mjs_fut: asyncio.Task, full_status):
3385-
await mjs_fut
3385+
# Workers notify the driver that jobs have been started optimistically
3386+
# and hitherto defer checking the outcome of that notification.
3387+
# At this point, the job has been completed; errors raised by awaiting
3388+
# `mjs_fut` should not prevent workers notifying the driver of such.
3389+
try:
3390+
await mjs_fut
3391+
except:
3392+
log.warning(
3393+
f'awaiting optimistic mark_started call for job {job} failed.',
3394+
exc_info=True,
3395+
stack_info=True,
3396+
)
3397+
33863398
try:
33873399
await self.post_job_complete_1(job, full_status)
33883400
except asyncio.CancelledError:

0 commit comments

Comments
 (0)