Health check handler for the application.
Returns the app settings as details if successful, otherwise a 503.
AbstractHealthCheck
Bases: ABC
Base protocol for implementing health checks.
live
async
Run a liveness check.
Returns:
Type |
Description |
bool
|
True if the service is running, False otherwise |
ready
abstractmethod
async
Run readiness check.
Returns:
Type |
Description |
bool
|
True if the service is ready to serve requests, False otherwise |
AppHealthCheck
Bases: AbstractHealthCheck
Simple health check that does not require any dependencies.
ready
async
Readiness check used when no other health check is available.
HealthCheckFailure
HealthCheckFailure(health, *args, detail='', status_code=None, headers=None, extra=None)
Bases: ServiceUnavailableException
Raise for health check failure.
HealthController
Bases: Controller
Holds health endpoints.
health_check
async
Run registered health checks.
HealthResource
Bases: BaseModel
Health data returned by the health endpoint.
health_failure_exception_handler
health_failure_exception_handler(_, exc)
Return all health checks data on HealthCheckFailure
.