When you trigger runs you can provide an idempotencyKey in the options: https://trigger.dev/docs/v3/idempotency
This allows you to have idempotency but it can be a bit clunky having to create lots of separate tasks in some situations.
We should add a simple idempotency function you can use inside of tasks:
const result = await idempotent("an-idempotency-key", () => {
return doSomething();
});
If the task failed and was reattempted, it would only ever execute that idempotent function once. The second time it would immediately return the cached result for the key you pass in ("an-idempotency-key").
Rejected
π‘ Feature Request
Over 1 year ago
Linear
Get notified by email when there are changes.
Rejected
π‘ Feature Request
Over 1 year ago
Linear
Get notified by email when there are changes.