Skip to content

Commit d2b44bc

Browse files
chore: add a nuance to the onCancel hook documentation
1 parent 6409fea commit d2b44bc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/tasks/overview.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,10 @@ export const cancelExampleTask = task({
530530
});
531531
```
532532
533+
<Info>
534+
The `onCancel` hook doesn’t fire if the task being canceled isn’t currently executing (for example, it won’t run for tasks waiting at a pending waitpoint).
535+
</Info>
536+
533537
<Note>
534538
You will have up to 30 seconds to complete the `runPromise` in the `onCancel` hook. After that
535539
point the process will be killed.

0 commit comments

Comments
 (0)