@@ -238,7 +238,8 @@ Triggers a single run of a task with the payload you pass in, and any options yo
238
238
</Note >
239
239
240
240
``` ts ./trigger/my-task.ts
241
- import { myOtherTask , runs } from " ~/trigger/my-other-task" ;
241
+ import { runs } from " @trigger.dev/sdk/v3" ;
242
+ import { myOtherTask } from " ~/trigger/my-other-task" ;
242
243
243
244
export const myTask = task ({
244
245
id: " my-task" ,
@@ -254,7 +255,8 @@ export const myTask = task({
254
255
To pass options to the triggered task, you can use the second argument:
255
256
256
257
``` ts ./trigger/my-task.ts
257
- import { myOtherTask , runs } from " ~/trigger/my-other-task" ;
258
+ import { runs } from " @trigger.dev/sdk/v3" ;
259
+ import { myOtherTask } from " ~/trigger/my-other-task" ;
258
260
259
261
export const myTask = task ({
260
262
id: " my-task" ,
@@ -272,7 +274,8 @@ export const myTask = task({
272
274
Triggers multiple runs of a single task with the payloads you pass in, and any options you specify.
273
275
274
276
``` ts /trigger/my-task.ts
275
- import { myOtherTask , batch } from " ~/trigger/my-other-task" ;
277
+ import { batch } from " @trigger.dev/sdk/v3" ;
278
+ import { myOtherTask } from " ~/trigger/my-other-task" ;
276
279
277
280
export const myTask = task ({
278
281
id: " my-task" ,
@@ -288,7 +291,8 @@ export const myTask = task({
288
291
If you need to pass options to ` batchTrigger ` , you can use the second argument:
289
292
290
293
``` ts /trigger/my-task.ts
291
- import { myOtherTask , batch } from " ~/trigger/my-other-task" ;
294
+ import { batch } from " @trigger.dev/sdk/v3" ;
295
+ import { myOtherTask } from " ~/trigger/my-other-task" ;
292
296
293
297
export const myTask = task ({
294
298
id: " my-task" ,
@@ -306,7 +310,8 @@ export const myTask = task({
306
310
You can also pass in options for each run in the batch:
307
311
308
312
``` ts /trigger/my-task.ts
309
- import { myOtherTask , batch } from " ~/trigger/my-other-task" ;
313
+ import { batch } from " @trigger.dev/sdk/v3" ;
314
+ import { myOtherTask } from " ~/trigger/my-other-task" ;
310
315
311
316
export const myTask = task ({
312
317
id: " my-task" ,
0 commit comments