Skip to content

Commit

Permalink
Set machine when triggering docs
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-aitken authored Feb 11, 2025
1 parent d4043fc commit a50b93f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/machines.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@ export const config: TriggerConfig = {
};
```

## Overriding the machine when triggering

You can also override the task machine when you [trigger](/triggering) it:

```ts
await tasks.trigger<typeof heavyTask>("heavy-task", { message: "hello world" }, { machine: "large-2x" });
```

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.

## Out Of Memory errors

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

0 comments on commit a50b93f

Please sign in to comment.