You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/v3/triggering.mdx
+78Lines changed: 78 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -161,6 +161,43 @@ export const myTask = task({
161
161
162
162
This is where it gets interesting. You can trigger a task and then wait for the result. This is useful when you need to call a different task and then use the result to continue with your task.
163
163
164
+
<Accordiontitle="Don't use this in parallel, e.g. with `Promise.all()`">
165
+
Instead, use `batchTriggerAndWait()` if you can, or a for loop if you can't.
You can batch trigger a task and wait for all the results. This is useful for the fan-out pattern, where you need to call a task multiple times and then wait for all the results to continue with your task.
179
216
217
+
<Accordiontitle="Don't use this in parallel, e.g. with `Promise.all()`">
218
+
Instead, pass in all items at once and set an appropriate `maxConcurrency`. Alternatively, use sequentially with a for loop.
0 commit comments