BackgroundStatus
The return type ofcontroller.backgroundStatus() from initLatestDeployment(). Provides health information about the background polling loop that keeps a deployment up to date.
Definition
Fields
| Field | Type | Description |
|---|---|---|
stopped | boolean | true if the background polling loop has been stopped (either manually via controller.stop() or due to unrecoverable errors). |
consecutiveFailures | number | The number of consecutive refresh failures since the last successful poll. Resets to 0 on a successful refresh. |
lastError | Error | null | The most recent error encountered during polling, or null if the last refresh succeeded. |
lastRefreshed | Date | Timestamp of the last successful deployment refresh. |
Usage
Health monitoring
UsebackgroundStatus() in a periodic health check to detect degraded state:
See Also
- Adaline —
initLatestDeployment()returns the controller that exposes this type