Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions 4 docs/idempotency.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ If you are triggering a task from your backend code, you can use the `idempotenc
import { idempotencyKeys, tasks } from "@trigger.dev/sdk/v3";

// You can also pass an array of strings to create a idempotency key
const idempotencyKey = await idempotenceKeys.create([myUser.id, "my-task"]);
const idempotencyKey = await idempotencyKeys.create([myUser.id, "my-task"]);
await tasks.trigger("my-task", { some: "data" }, { idempotencyKey });
```

Expand All @@ -83,7 +83,7 @@ import { tasks } from "@trigger.dev/sdk/v3";
await tasks.batchTrigger("my-task", [
{
payload: { some: "data" },
options: { idempotencyKey: await idempotenceKeys.create(myUser.id) },
options: { idempotencyKey: await idempotencyKeys.create(myUser.id) },
},
]);
```
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.