Skip to content

Commit 3677703

Browse files
committed
added single triggering
1 parent f2e26ce commit 3677703

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/troubleshooting.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ Make sure that you always use `await` when you call `trigger`, `triggerAndWait`,
177177

178178
### `COULD_NOT_FIND_EXECUTOR`
179179

180-
If you see a `COULD_NOT_FIND_EXECUTOR` error when triggering a task via `batchTrigger` or `batchTriggerAndWait`, it may be caused by dynamically importing the child task. When tasks are dynamically imported, the executor may not be properly registered.
180+
If you see a `COULD_NOT_FIND_EXECUTOR` error when triggering a task, it may be caused by dynamically importing the child task. When tasks are dynamically imported, the executor may not be properly registered.
181181

182182
Use a top-level import instead:
183183

@@ -187,12 +187,12 @@ import { myChildTask } from "~/trigger/my-child-task";
187187
export const myTask = task({
188188
id: "my-task",
189189
run: async (payload: string) => {
190-
await myChildTask.batchTrigger([{ payload: "data" }]);
190+
await myChildTask.trigger({ payload: "data" });
191191
},
192192
});
193193
```
194194

195-
Alternatively, use `batch.triggerAndWait()` without importing the task:
195+
Alternatively, use `tasks.trigger()` or `batch.triggerAndWait()` without importing the task:
196196

197197
```ts
198198
import { batch } from "@trigger.dev/sdk";

0 commit comments

Comments
 (0)