Skip to content

Commit

Permalink
Fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexhsamuel committed Dec 1, 2023
1 parent 2064b09 commit fe16402
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions python/apsis/program/procstar/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit fe16402

Please sign in to comment.