Add a timeout to the health check on the registry workers
This commit is contained in:
parent
93708d0131
commit
2bae008bb1
1 changed files with 1 additions and 1 deletions
|
@ -167,7 +167,7 @@ def health():
|
||||||
port = ':' + hostname_parts[1]
|
port = ':' + hostname_parts[1]
|
||||||
|
|
||||||
registry_url = '%s://localhost%s/v1/_internal_ping' % (app.config['PREFERRED_URL_SCHEME'], port)
|
registry_url = '%s://localhost%s/v1/_internal_ping' % (app.config['PREFERRED_URL_SCHEME'], port)
|
||||||
registry_healthy = client.get(registry_url, verify=False).status_code == 200
|
registry_healthy = client.get(registry_url, verify=False, timeout=2).status_code == 200
|
||||||
|
|
||||||
check = HealthCheck.get_check(app.config['HEALTH_CHECKER'][0], app.config['HEALTH_CHECKER'][1])
|
check = HealthCheck.get_check(app.config['HEALTH_CHECKER'][0], app.config['HEALTH_CHECKER'][1])
|
||||||
(data, is_healthy) = check.conduct_healthcheck(db_healthy, buildlogs_healthy, registry_healthy)
|
(data, is_healthy) = check.conduct_healthcheck(db_healthy, buildlogs_healthy, registry_healthy)
|
||||||
|
|
Reference in a new issue