From f4fd65f5733617bc0428b6bb6389649358eeec8c Mon Sep 17 00:00:00 2001 From: "Darren St. Amour" Date: Mon, 10 Jul 2023 22:23:50 -0700 Subject: [PATCH] Reduce healthcheck CPU --- sanic_ext/extensions/health/monitor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sanic_ext/extensions/health/monitor.py b/sanic_ext/extensions/health/monitor.py index 346bde0..f210d73 100644 --- a/sanic_ext/extensions/health/monitor.py +++ b/sanic_ext/extensions/health/monitor.py @@ -120,7 +120,7 @@ def __call__(self, process_names, health_queue) -> None: } while self.run: try: - name, timestamp = health_queue.get_nowait() + name, timestamp = health_queue.get(timeout=0.05) except Empty: ... else: