BackgroundStatus
Shape of the dict returned byget_background_status() on both the deployment controller (from init_latest_deployment) and the evaluation results controller (from init_evaluation_results). Tells you whether the background polling loop is healthy, when it last succeeded, and what the most recent error (if any) was.
Shape
Fields
| Field | Type | Description |
|---|---|---|
stopped | bool | True if the background polling loop has stopped (either manually via await controller.stop() or due to max_continuous_failures being reached). |
consecutive_failures | int | Number of consecutive refresh failures since the last successful poll. Resets to 0 on a successful refresh. |
last_error | Optional[str] | Message from the most recent error, or None if the last refresh succeeded. |
last_refreshed | datetime | UTC timestamp of the last refresh attempt. |
Usage
Health monitoring
Useget_background_status() in a periodic health check to detect degraded state: