Skip to content

Commit a50b93f

Browse files
authored
Set machine when triggering docs
1 parent d4043fc commit a50b93f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/machines.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@ export const config: TriggerConfig = {
2626
};
2727
```
2828

29+
## Overriding the machine when triggering
30+
31+
You can also override the task machine when you [trigger](/triggering) it:
32+
33+
```ts
34+
await tasks.trigger<typeof heavyTask>("heavy-task", { message: "hello world" }, { machine: "large-2x" });
35+
```
36+
37+
This is useful when you know that a certain payload will require more memory than the default machine. For example, you know it's a larger file or a customer that has a lot of data.
38+
2939
## Out Of Memory errors
3040

3141
Sometimes you might see one of your runs fail with an "Out Of Memory" error.

0 commit comments

Comments
 (0)