Skip to content

Commit

Permalink
Add logging for uvicorn ping/pong
Browse files Browse the repository at this point in the history
  • Loading branch information
brianglass committed Jul 25, 2024
1 parent 04700b3 commit 860a685
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@


class Process(multiprocess.Process):
def always_pong(self):
logger.info(f"always_pong is starting for process {self.process.pid}.")
super().always_pong()

def is_alive(self, timeout: float = 5) -> bool:
if not self.process.is_alive():
logger.error(f"Process {self.process.pid} is not alive.")
Expand Down

0 comments on commit 860a685

Please sign in to comment.