Skip to content

Prototype: configure workpool with component init args - #274

Draft
reeceyang wants to merge 4 commits into
mainfrom
reece/component-init-prototype
Draft

reeceyang wants to merge 4 commits into
mainfrom
reece/component-init-prototype

Conversation

@reeceyang

@reeceyang reeceyang commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Explores configuring workpool through the component init and install-time args from convex/convex#62236, to find the config pattern for the docs in convex/convex#62237. Not meant to merge.

The init stores maxParallelism and logLevel as the globals document, writing only when they change, and readers apply the defaults. The per-call Workpool options, the config argument on enqueue/enqueueBatch and the logLevel argument on cancel/cancelAll are removed, a breaking client change that's fine for an exploration; retry defaults stay client-side Workpool options. The public config.update mutation stays as a runtime override that wins over the install args and persists across pushes, so a pool can be scaled or paused without a deploy. The convex and convex-test dependencies are the previews from convex/convex#62236 and convex/convex-test#212.

🤖 Generated with Claude Code

@reeceyang
reeceyang force-pushed the reece/component-init-prototype branch 4 times, most recently from fbb8ad2 to c9ffd5e Compare November 19, 2026 23:44
Also inline batch-worker in vitest, since convex-test now loads its convex.config, and pass a config to the enqueueHandler calls main added to loop.test.ts.
@reeceyang
reeceyang force-pushed the reece/component-init-prototype branch from c9ffd5e to ea0f3fd Compare November 19, 2026 23:47
@pkg-pr-new

pkg-pr-new Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

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

commit: c6549a9

Drop the pool-wide onComplete and the server-side retry resolution: retry
defaults stay client-side Workpool options as on main, and init only carries
the config the component already stores per installation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@reeceyang
reeceyang force-pushed the reece/component-init-prototype branch 3 times, most recently from 3e8af3d to 4956f4c Compare November 20, 2026 00:28
@reeceyang
reeceyang force-pushed the reece/component-init-prototype branch from 4956f4c to 853f76f Compare November 20, 2026 00:49
Drop the per-call client options, the config arg on enqueue/enqueueBatch and
the logLevel arg on cancel/cancelAll. The globals document holds the init args,
plus runtime overrides from config.update that win over them and persist
across pushes, with defaults applied when read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@reeceyang
reeceyang force-pushed the reece/component-init-prototype branch from 853f76f to c6549a9 Compare November 20, 2026 00:52
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.

1 participant