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
thrownewResponse("Method Not Allowed", { status: 405 });
198
+
}
199
+
200
+
//get the JSON from the request
201
+
const data =awaitrequest.json();
202
+
203
+
// Pass the task type to `triggerAndPoll()` as a generic argument, giving you full type checking
204
+
const result =awaittasks.triggerAndPoll<typeofemailSequence>(
205
+
"email-sequence",
206
+
{
207
+
to: data.email,
208
+
name: data.name,
209
+
},
210
+
{ pollIntervalMs: 5000 }
211
+
);
212
+
213
+
//return a success response with the result
214
+
returnjson(result);
215
+
}
216
+
```
166
217
</CodeGroup>
167
218
168
219
<Note>
@@ -705,4 +756,4 @@ export const myTask = task({
705
756
706
757
### Batch Triggering
707
758
708
-
When using `batchTrigger` or `batchTriggerAndWait`, the total size of all payloads cannot exceed 10MB. This means if you are doing a batch of 100 runs, each payload should be less than 100KB.
759
+
When using `batchTrigger` or `batchTriggerAndWait`, the total size of all payloads cannot exceed 10MB. This means if you are doing a batch of 100 runs, each payload should be less than 100KB.
0 commit comments