pub async fn relayer_health_check_handler(
job: Job<RelayerHealthCheck>,
app_state: Data<ThinData<DefaultAppState>>,
attempt: Attempt,
) -> Result<(), Error>Expand description
Handler for relayer health check jobs.
This event-driven handler:
- Checks if the relayer is disabled (exits early if not)
- Runs stateless health checks on the disabled relayer
- On success: Re-enables the relayer and sends a recovery notification
- On failure: Updates the disabled reason (if changed) and schedules retry with exponential backoff
§Behavior
- Early exit: If relayer is not disabled, exits without running checks
- Recovery notification: Unlike bootstrap (silent), sends notification when re-enabled
- Reason tracking: Updates disabled_reason if the failure reason changes between retries
- No redundant updates: Only updates reason when it actually changes
§Arguments
job- The job containing relayer health check dataapp_state- Application state with repositories and servicesattempt- Current attempt number for retry logic
§Returns
Returns Ok(()) if the health check completes successfully, or an error otherwise.