Skip to main content

Module tasks

Module tasks 

Source

Structs§

Factory
TaskWorker
TaskWorkerChannels

Enums§

TaskOutcome
Done = one-shot, row deleted. RescheduleAt(ns) = recurring, row kept and advanced to that absolute deadline.

Traits§

TaskHandlers
The handlers a TaskWorker runs. The runner owns each task’s schedule: expiry, attempts, backoff and rate-limit holds. The handlers run one row.

Functions§

apply_pull_in
Run a PullInDeadline task: lower its target’s deadline to the ceiling.
enqueue_pull_in
Durably enqueue a PullInDeadline for target_data_hash, then emit its fact. The row is committed before the event; duplicates coalesce on data_hash. Lifetime is bounded by expires_at_ns alone (pass NEVER_EXPIRES for critical nudges). Callers must commit the target row FIRST: a pull-in never waits for its target — a miss is dropped (debug-logged), since a missing target is normally a completed one-shot and retrying would spin forever on never-expiring nudges.