1
0
mirror of https://github.com/quay/quay.git synced 2025-04-18 10:44:06 +03:00

healthcheck: Make gunicorn health check timeout configurable (PROJQUAY-8757) (#3746)

healthcheck: Make gunicorn health check timeout configurable
This commit is contained in:
Sunandadadi 2025-03-31 11:12:03 -04:00 committed by GitHub
parent beffc489d6
commit be08d4893d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -40,7 +40,11 @@ def _check_gunicorn(endpoint):
client = app.config["HTTPCLIENT"]
registry_url = _compute_internal_endpoint(app, endpoint)
try:
status_code = client.get(registry_url, verify=False, timeout=2).status_code
status_code = client.get(
registry_url,
verify=False,
timeout=app.config.get("GUNICORN_HEALTH_CHECK_TIMEOUT", 2),
).status_code
okay = status_code == 200
message = ("Got non-200 response for worker: %s" % status_code) if not okay else None
return (okay, message)