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: