Skip to content

dedupe

const dedupe: object

The dedupe helpers every add() picks from.

readonly debounce(key, wait): Dedupe

Debounce: the job waits wait before it runs, and each repeat within that time replaces its payload and restarts the wait, so only the last one runs.

DedupeKey

Duration

Dedupe

readonly none(): Dedupe

No dedupe: every call is a new job. Say so explicitly.

Dedupe

readonly until(key): Dedupe

Until settled: repeats are dropped while the first job with this key is waiting, delayed or running (retries included); once it completes or fails for good, the next one is a new job.

DedupeKey

Dedupe

readonly window(key, ttl): Dedupe

Throttle: the first job with this key runs; repeats within ttl of it are dropped, whether the first job is still waiting, already finished, or failed and kept in the dead-letter set. After ttl a repeat is a new job.

DedupeKey

Duration

Dedupe