HealthCheckService

class gafaelfawr.services.health.HealthCheckService(*, token_db_store, token_redis_store, user_info_service, session)

Bases: object

Check the health of the Gafaelfawr service.

Intended to be invoked via a Kubernetes liveness check and test the underlying Redis, database, and LDAP connections.

Parameters:

Methods Summary

check(*[, check_user_info])

Check the health of the underlying database and Redis.

Methods Documentation

async check(*, check_user_info=True)

Check the health of the underlying database and Redis.

Raises an exception of some kind if one of the underlying services is unavailable.

Parameters:

check_user_info (bool, default: True) – Whether to check the connections to the user metadata backends. This is disabled for the Kubernetes operator, which doesn’t need access to those.

Return type:

None