From 541e17a863dbdb6c4d37f343505f5db3f6f13fe6 Mon Sep 17 00:00:00 2001 From: Diego Valenzuela Date: Mon, 4 Nov 2024 16:06:15 -0300 Subject: [PATCH 1/2] Fix: Typo on overview.mdx the import helloWorldTask wasn't called correctly at an example --- docs/tasks/overview.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tasks/overview.mdx b/docs/tasks/overview.mdx index cb99c900f1..1aa204220c 100644 --- a/docs/tasks/overview.mdx +++ b/docs/tasks/overview.mdx @@ -37,7 +37,7 @@ import { helloWorldTask } from "./trigger/hello-world"; async function triggerHelloWorld() { //This triggers the task and returns a handle - const handle = await helloWorld.trigger({ message: "Hello world!" }); + const handle = await helloWorldTask.trigger({ message: "Hello world!" }); //You can use the handle to check the status of the task, cancel and retry it. console.log("Task is running with handle", handle.id); From f8d6a8cbc1c2727973f349ccc0d5ade773050154 Mon Sep 17 00:00:00 2001 From: Diego Valenzuela Date: Mon, 4 Nov 2024 17:27:16 -0300 Subject: [PATCH 2/2] Fix: Typo update on overview.mdx Now the import is called `helloWorld` instead of `helloWorldTask` to be consistent with the filename as requested --- docs/tasks/overview.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/tasks/overview.mdx b/docs/tasks/overview.mdx index 1aa204220c..2f0c7961f1 100644 --- a/docs/tasks/overview.mdx +++ b/docs/tasks/overview.mdx @@ -33,11 +33,11 @@ You can trigger this in two ways: Here's how to trigger a single run from elsewhere in your code: ```ts Your backend code -import { helloWorldTask } from "./trigger/hello-world"; +import { helloWorld } from "./trigger/hello-world"; async function triggerHelloWorld() { //This triggers the task and returns a handle - const handle = await helloWorldTask.trigger({ message: "Hello world!" }); + const handle = await helloWorld.trigger({ message: "Hello world!" }); //You can use the handle to check the status of the task, cancel and retry it. console.log("Task is running with handle", handle.id);