-
-
Notifications
You must be signed in to change notification settings - Fork 811
docs: add machine option in triggering docs #2487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
WalkthroughDocumentation updated in docs/triggering.mdx. A new "machine" subsection under Triggering explains how to override the default machine preset when triggering a run, includes an example using await yourTask.trigger(payload, { machine: "large-1x" }), clarifies default behavior when not specified, and references the machines guide. No code or public API changes. Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Pre-merge checks (2 passed, 1 warning)❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal). Please share your feedback with us on this Discord post. ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
docs/triggering.mdx (1)
960-963
: Fix grammar in the region descriptionMinor grammar/clarity issue in user-facing docs.
-The region is where your runs are executed, it does not change where the run payload, output, tags, logs, or are any other data is stored. +The region is where your runs are executed; it does not change where the run payload, output, tags, logs, or any other data is stored.
🧹 Nitpick comments (1)
docs/triggering.mdx (1)
964-973
: Enhance machine option docs with backend and batch examplesShow how to set
machine
viatasks.trigger()
and per-item inbatchTrigger()
to mirror other options sections.### `machine` You can override the default machine preset when you trigger a run: ```ts await yourTask.trigger(payload, { machine: "large-1x" });-If you don't specify a machine it will use the machine preset for your task (or the default for your project). For more information read the machines guide.
+You can also set the machine when triggering from your backend:
+
+ts +import { tasks } from "@trigger.dev/sdk"; +await tasks.trigger<typeof emailSequence>("email-sequence", { to: "[email protected]" }, { machine: "large-1x" }); +
+
+…and per-run in a batch:
+
+```ts
+await yourTask.batchTrigger([
- { payload: { to: "[email protected]" }, options: { machine: "large-1x" } },
+]);
+```+If you don't specify a machine it will use the machine preset for your task (or the default for your project). For more information read the machines guide.
</blockquote></details> </blockquote></details> <details> <summary>📜 Review details</summary> **Configuration used**: CodeRabbit UI **Review profile**: CHILL **Plan**: Pro <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 12bef0a93838eaf13785797b0535d598bcb6ead3 and 9897ec4d97b5287b9ae826ff9ed9653fb3ccba0d. </details> <details> <summary>📒 Files selected for processing (1)</summary> * `docs/triggering.mdx` (1 hunks) </details> <details> <summary>🧰 Additional context used</summary> <details> <summary>🧠 Learnings (1)</summary> <details> <summary>📚 Learning: 2025-08-18T10:07:17.368Z</summary>
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-08-18T10:07:17.368Z
Learning: Applies to /trigger//*.{ts,tsx,js,jsx} : Define tasks using task({ id, run, ... }) with a unique id per project**Applied to files:** - `docs/triggering.mdx` </details> </details> </details> <details> <summary>⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)</summary> * GitHub Check: Analyze (javascript-typescript) </details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
No description provided.