Files
mtusi2026lab4/infra/minio/healthcheck.py
T
2026-11-06 13:57:29 +03:00

12 lines
305 B
Python

"""Liveness of the private MinIO service; no credentials in process arguments."""
import sys
from urllib.request import urlopen
try:
with urlopen("http://127.0.0.1:9000/minio/health/live", timeout=2) as response:
sys.exit(0 if response.status == 200 else 1)
except OSError:
sys.exit(1)