From fe164026a12d0705e85a346209e8ede1a3697ddf Mon Sep 17 00:00:00 2001 From: Alex Samuel Date: Fri, 1 Dec 2023 18:11:27 -0500 Subject: [PATCH] Fix. --- python/apsis/program/procstar/agent.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/python/apsis/program/procstar/agent.py b/python/apsis/program/procstar/agent.py index aff64fed..e3d09396 100644 --- a/python/apsis/program/procstar/agent.py +++ b/python/apsis/program/procstar/agent.py @@ -247,8 +247,10 @@ async def __wait(self, run_id, proc): ) # Wait for the next result from the agent, no more that update_interval. - if SERVER.update_interval > 0: - wait_timeout = min(timeout, SERVER.update_interval) + wait_timeout = ( + min(timeout, SERVER.update_interval) if SERVER.update_interval > 0 + else timeout + ) logging.debug(f"waiting for result {wait_timeout} (timeout in {timeout}): {run_id}") try: result = await asyncio.wait_for(anext(proc.results), wait_timeout)