Skip to content

Commit 8022e36

Browse files
committed
docs
1 parent 554385c commit 8022e36

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -285,11 +285,13 @@ export const exampleWorkflow = workflow.define({
285285

286286
### Specifying how many workflows can run in parallel
287287

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.
293295

294296
```ts
295297
const workflow = new WorkflowManager(components.workflow, {

example/convex/example.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,16 @@ export const startWorkflow = internalMutation({
8282
},
8383
});
8484

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+
8595
export const flowCompleted = internalMutation({
8696
args: {
8797
workflowId: vWorkflowId,

0 commit comments

Comments
 (0)