Skip to content

Commit a66fa13

Browse files
committed
chore: add changeset for skipIfActive feature
1 parent f30f251 commit a66fa13

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

.changeset/skip-if-active.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@trigger.dev/core": minor
3+
---
4+
5+
Add `skipIfActive: boolean` option to `tasks.trigger()` and batch items. When set (along with at least one `tag`), the server checks for an in-flight (non-terminal) TaskRun in the same environment with matching `taskIdentifier` and all of the supplied tags. If found, the trigger is a no-op and the existing run is returned with `isCached: true` + new `wasSkipped: true` flag — no new run, no queue entry.
6+
7+
Purpose: a first-class drop-on-conflict primitive for cron-style orchestrators that poll at a fixed cadence and should skip duplicate triggers without building a queue backlog (unlike `concurrencyKey`) or caching successful completions (unlike `idempotencyKey`).

0 commit comments

Comments
 (0)