From 6ec67997fdab4a0e45119c081a78090eca50d8fd Mon Sep 17 00:00:00 2001 From: David Schultz Date: Mon, 4 Nov 2024 10:48:38 -0600 Subject: [PATCH] do the job updating in the right place --- iceprod/server/plugins/condor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/iceprod/server/plugins/condor.py b/iceprod/server/plugins/condor.py index b8c32272..4c29b1ed 100644 --- a/iceprod/server/plugins/condor.py +++ b/iceprod/server/plugins/condor.py @@ -555,8 +555,7 @@ async def run(self, forever=True): while True: start = time.monotonic() try: - ret = await self.submit() - self.jobs.update(ret) + await self.submit() except Exception: logger.warning('failed to submit', exc_info=True) wait_time = max(0, self.cfg['queue']['submit_interval'] - (time.monotonic() - start)) @@ -592,7 +591,8 @@ async def submit(self): for key in tasks_by_dataset: tasks = tasks_by_dataset[key] try: - await self.submitter.submit(tasks, cur_jel) + ret = await self.submitter.submit(tasks, cur_jel) + self.jobs.update(ret) except Exception as e: logger.warning('submit failed for dataset %s', key, exc_info=True) async with asyncio.TaskGroup() as tg: