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
| [Run task](/sdk/io/runtask) | Wrap your own code in this to create a Task | `awaitio.runTask("My Task", { name: "My Task" }, async () => { console.log("Hello"); });` |
130
-
| [Background fetch](/sdk/io/backgroundfetch) | Fetch data from a URL that can take longer that the serverless timeout. | `awaitio.backgroundFetch("fetch-some-data", { url: "https://example.com" });`|
| [Run task](/sdk/io/runtask) | Wrap your own code in this to create a Task | `awaitio.runTask("My Task", async () => { console.log("Hello"); });` |
129
+
| [Background fetch](/sdk/io/backgroundfetch) | Fetch data from a URL that can take longer that the serverless timeout. | `awaitio.backgroundFetch("fetch-some-data", { url: "https://example.com" });` |
131
130
132
131
For a full list of built-in Tasks, see the [io SDK reference](/sdk/io).
133
132
134
133
**Integration Task examples:**
135
134
136
135
<Info>
137
-
To use our integrations you will need to set them up in the app first. Our
138
-
guide is [here](/documentation/guides/using-integrations).
136
+
To use our integrations you will need to set them up in the app first. Our guide is
137
+
[here](/documentation/guides/using-integrations).
139
138
</Info>
140
139
141
140
<AccordionGroup>
@@ -229,10 +228,9 @@ yarn dlx @trigger.dev/cli@latest dev
229
228
This will register all of your Jobs, they should appear in your dashboard.
230
229
231
230
<Note>
232
-
Not seeing your Job in the web app? It might be because you forgot to import
233
-
it. This will need to be either in `app/api/trigger/route.ts` file if you're
234
-
using the Next,js App Router, or `pages/api/trigger.ts` if you're using the
235
-
Next,js Pages Router.
231
+
Not seeing your Job in the web app? It might be because you forgot to import it. This will need to
232
+
be either in `app/api/trigger/route.ts` file if you're using the Next,js App Router, or
233
+
`pages/api/trigger.ts` if you're using the Next,js Pages Router.
236
234
</Note>
237
235
238
236
If you are having trouble getting your job running, please reach out to us and we will help you fix any issues:
Copy file name to clipboardExpand all lines: docs/integrations/apis/plain.mdx
+6-13Lines changed: 6 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -131,7 +131,7 @@ client.defineJob({
131
131
132
132
## Using the underlying client
133
133
134
-
You can use the underlying client to do anything [@team-plain/typescript-sdk](https://github.com/team-plain/typescript-sdk) supports, but make sure to wrap it in a task:
134
+
You can use the underlying client to do anything [@team-plain/typescript-sdk](https://github.com/team-plain/typescript-sdk) supports by using runTask:
Copy file name to clipboardExpand all lines: docs/integrations/apis/stripe.mdx
+19-14Lines changed: 19 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -215,7 +215,7 @@ If there are any tasks missing that you'd like to see added, please [open a new
215
215
216
216
## Using the underlying Stripe client
217
217
218
-
You can use the underlying client to do anything the [stripe-node](https://github.com/stripe/stripe-node) client supports by using the `client` property on the integration:
218
+
You can use the underlying client to do anything the [stripe-node](https://github.com/stripe/stripe-node) client supports by using `runTask` on the integration:
Copy file name to clipboardExpand all lines: docs/integrations/apis/typeform.mdx
+22-8Lines changed: 22 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -119,7 +119,7 @@ client.defineJob({
119
119
120
120
## Using the underlying client
121
121
122
-
You can use the underlying client to do anything [@typeform/api-client](https://www.npmjs.com/package/@typeform/api-client) supports, but make sure to wrap it in a task:
122
+
You can use the underlying client to do anything [@typeform/api-client](https://www.npmjs.com/package/@typeform/api-client) supports:
The callback that will be called when the Task is run, this is where your logic should go. The callback receives
92
-
the Task and the IO as parameters.
93
-
94
-
<Expandabletitle="arguments">
95
-
<ResponseFieldname="task"type="Task">
96
-
The Task that is running. It has some useful properties like `idempotencyKey` and `attempts`.
97
-
</ResponseField>
98
-
<ResponseFieldname="io"type="IO">
99
-
[IO](/sdk/io/overview) holds Integrations and useful actions you can perform.
100
-
</ResponseField>
101
-
</Expandable>
102
-
</ResponseField>
103
-
104
104
<ResponseFieldname="onError"type="function">
105
105
An optional callback that will be called when the Task fails. You can perform
106
106
logic in here and optionally return a custom error object. Returning an object with `{ retryAt: Date, error?: Error }` will retry the Task at the specified Date. You can also just return a new `Error` object to throw a new error. Return nothing to rethrow the original error.
0 commit comments