File tree Expand file tree Collapse file tree 2 files changed +17
-5
lines changed Expand file tree Collapse file tree 2 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -285,11 +285,13 @@ export const exampleWorkflow = workflow.define({
285
285
286
286
### Specifying how many workflows can run in parallel
287
287
288
- You can specify how many workflows can run in parallel by setting the ` maxParallelism `
289
- workpool option. It has a reasonable default. You should not exceed 50 across
290
- all your workflows. If you want to do a lot of work in parallel, you should
291
- employ batching, where each workflow operates on a batch of work, e.g. scraping
292
- a list of links instead of one link per workflow.
288
+ You can specify how many steps can run in parallel by setting the
289
+ ` maxParallelism ` workpool option. It has a reasonable default.
290
+ On the free tier, you should not exceed 20.
291
+ On a Pro account, you should not exceed 100 across all your workflows and workpools.
292
+ If you want to do a lot of work in parallel, you should employ batching, where
293
+ each workflow operates on a batch of work, e.g. scraping a list of links instead
294
+ of one link per workflow.
293
295
294
296
``` ts
295
297
const workflow = new WorkflowManager (components .workflow , {
Original file line number Diff line number Diff line change @@ -82,6 +82,16 @@ export const startWorkflow = internalMutation({
82
82
} ,
83
83
} ) ;
84
84
85
+ export const cancelWorkflow = internalMutation ( {
86
+ args : {
87
+ workflowId : vWorkflowId ,
88
+ } ,
89
+ returns : v . null ( ) ,
90
+ handler : async ( ctx , args ) => {
91
+ await workflow . cancel ( ctx , args . workflowId ) ;
92
+ } ,
93
+ } ) ;
94
+
85
95
export const flowCompleted = internalMutation ( {
86
96
args : {
87
97
workflowId : vWorkflowId ,
You can’t perform that action at this time.
0 commit comments