You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[workers] InProcessJobRunner abort grace is 1 s and the generated worker cannot change it #2633
InProcessJobRunner waits one second after an abort before it rejects the dispatch, while the handler may still be running. The generated worker process has no way to change that value.
packages/plugin-workers-core/src/runtime/in-process-job-runner.ts:42: options.abortGracePeriodMs ?? 1_000. It applies to every abort: shutdown, cancel and deadline.
plugins/workers/bin/runtime.ts:181 passes only { registry } as workerPoolOptions, so the default always applies in the standard runtime.
Expected behavior
The grace period is configurable through worker configuration, and its default matches the budget the queue and the worker drain already give an in-flight job.
Acceptance
Worker configuration exposes the abort grace period and the standard runtime forwards it to the runner.
The default is derived from, or documented against, the drain budget, with the reasoning in the JSDoc.
A test shows a handler that needs more than one second to clean up after an abort is awaited when the grace period allows it.
The workers documentation lists the option and its default.
Acceptance evidence: PR #2645 implementation and local validation. Each checked criterion maps to its fenced acceptance-evidence entry in the PR body. Full supported runtime and independent evaluation remain PR readiness gates.
Activity