Skip to content

Commit

Permalink
do the job updating in the right place
Browse files Browse the repository at this point in the history
  • Loading branch information
dsschult committed Nov 4, 2024
1 parent ecd9d69 commit 6ec6799
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions iceprod/server/plugins/condor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 6ec6799

Please sign in to comment.