Skip to main content

run_task_heartbeat_loop

Function run_task_heartbeat_loop 

Source
pub async fn run_task_heartbeat_loop<Store, LeaseExpiresFn>(
    store: Store,
    lease_guard: TaskLeaseGuard,
    stop_token: CancellationToken,
    interval: Duration,
    lease_expires_at: LeaseExpiresFn,
)
where Store: TaskHeartbeatStore, LeaseExpiresFn: Fn(DateTime<Utc>) -> DateTime<Utc> + Send + Sync,
Expand description

Runs heartbeat updates until stopped, the persisted lease is lost, or renewal times out.