Skip to content

Commit

Permalink
Catch case where PID finishes while processing stats.
Browse files Browse the repository at this point in the history
  • Loading branch information
JSKenyon committed May 28, 2024
1 parent c4ffd26 commit 182f6bc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion stimela/task_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,10 @@ async def run_process_status_update():
if progress_bar:
with contextlib.suppress(asyncio.CancelledError):
while True:
update_process_status()
try:
update_process_status()
except psutil.NoSuchProcess:
continue
await asyncio.sleep(1)

_printed_stats = dict(
Expand Down

0 comments on commit 182f6bc

Please sign in to comment.