Skip to content

Commit 98fad73

Browse files
committed
Adedd a simple batch task to the hello world reference catalog
1 parent f0c250f commit 98fad73

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

references/hello-world/src/trigger/example.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@ export const parentTask = task({
2626
},
2727
});
2828

29+
export const batchParentTask = task({
30+
id: "batch-parent",
31+
run: async (payload: any, { ctx }) => {
32+
logger.log("Hello, world from the parent", { payload });
33+
await childTask.batchTriggerAndWait([{ payload: { message: "Hello, world!" } }]);
34+
},
35+
});
36+
2937
export const childTask = task({
3038
id: "child",
3139
run: async (payload: any, { ctx }) => {

0 commit comments

Comments
 (0)