pub async fn wait_handler(
duration: Duration,
state: &Arc<ExecutionState>,
op_id: &OperationIdentifier,
logger: &Arc<dyn Logger>,
) -> Result<(), DurableError>Expand description
Executes a wait operation that pauses execution for a specified duration.
This handler implements the wait semantics:
- Validates that duration is at least 1 second
- Checkpoints the wait start time
- Checks if the wait has elapsed
- Suspends execution if the wait has not elapsed
§Arguments
duration- The duration to waitstate- The execution state for checkpointingop_id- The operation identifierlogger- Logger for structured logging
§Returns
Ok(()) when the wait has elapsed, or a Suspend error if still waiting.