Skip to content

Filter onComplete callbacks by result status - #237

Merged
ianmacartney merged 4 commits into
mainfrom
ian/on-complete-statuses
Sep 11, 2026
Merged

ianmacartney merged 4 commits into
mainfrom
ian/on-complete-statuses

Conversation

@ianmacartney

@ianmacartney ianmacartney commented Sep 10, 2026 •

Copy link
Copy Markdown
Member

Callers who only need failure or cancellation handling can now reuse one onComplete handler with onCompleteExcludeKinds: ["success"].

This is an alternative to #231 (onFailure) and #236 (onCancel), based on current main now that their shared test cleanup has landed. It does not depend on either feature PR.

Mutation-only transactional success is a separate stacked change in #238, and for queries in #239.

@pkg-pr-new

pkg-pr-new Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/get-convex/workpool/@convex-dev/workpool@237

commit: b395444

ianmacartney commented Sep 10, 2026 •

Copy link
Copy Markdown
Member Author

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 8 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread README.md Resolved
Comment thread src/component/lib.test.ts

describe("enqueue", () => {
it.each([false, true])(
"accepts legacy, empty, and populated callback exclusions (batch: %s)",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is a legacy callback exclusion? excludeKinds: undefined?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup!

@ianmacartney
ianmacartney merged commit 1ab826a into main Sep 11, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants