Handle containers going missing in the middle of a metrics run

This commit is contained in:
Scott Wallace 2022-06-01 03:52:34 +01:00
parent 8d6eb6687f
commit 2f9830c16a
Signed by: scott
GPG key ID: AA742FDC5AFE2A72

View file

@ -37,7 +37,10 @@ class HTTPHandler(MetricsHandler): # type: ignore[misc]
Handle GET requests
"""
if self.path == '/metrics':
self._metrics()
try:
self._metrics()
except docker.errors.NotFound:
pass
if self.path == '/healthcheck':
if not healthy():