Skip to content

Commit

Permalink
fix: do not log process warning when process not found (#1281)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidzhao authored Dec 23, 2024
1 parent 797253d commit 42b0e68
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/six-wasps-pay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"livekit-agents": patch
---

fix: do not log process warning when process not found
5 changes: 5 additions & 0 deletions livekit-agents/livekit/agents/ipc/supervised_proc.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,11 +378,16 @@ async def _memory_monitor_task(self) -> None:
)

except (psutil.NoSuchProcess, psutil.AccessDenied) as e:
if self._closing or self._kill_sent:
return

logger.warning(
"Failed to get memory info for process",
extra=self.logging_extra(),
exc_info=e,
)
# don't bother rechecking if we cannot get process info
return
except Exception:
if self._closing or self._kill_sent:
return
Expand Down

0 comments on commit 42b0e68

Please sign in to comment.