Skip to content

feat(queue-manager-core): add beforeResume option to Manager - #1538

Open
llawliet-l-l wants to merge 1 commit into
feat/RC-505-core-typed-json-task-payloadfrom
feat/RC-592-core-before-resume
Open

llawliet-l-l wants to merge 1 commit into
feat/RC-505-core-typed-json-task-payloadfrom
feat/RC-592-core-before-resume

Conversation

@llawliet-l-l

@llawliet-l-l llawliet-l-l commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Adds an optional beforeResume(context, item) hook to core's Manager. It is called synchronously right before a queue run starts, so a caller can adjust the context for that run, e.g. to pick the wallet a queue uses when several are connected.

Changes

  • The hook runs wherever a run starts: create's run closure, resume(), forceExecute(), and both sync paths. retry() and unblocked queues reach it through execute() and those same closures.
  • context is the value the run is about to get: context.current, or a fresh {} when that is unset. Core reads the context again after the hook, so in-place changes to current apply to that run.
  • Without the option, runs read the context exactly as before.

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • Implemented a user interface (UI) change, referencing our Figma design to ensure pixel-perfect precision.

Core calls the optional `beforeResume(context, item)` before each queue
run, with the live context and a fresh `PersistedQueue` of the queue,
then reads the context again so the hook can change it for that run.

This branch was successfully deployed

3 active deployments
playground-preview — 4cc3fc0d Deployed Nov 11, 2026 by llawliet-l-l via playground-preview #5569
app-preview — 4cc3fc0d Deployed Nov 11, 2026 by llawliet-l-l via app-preview #5569
preview — 4cc3fc0d Deployed Nov 11, 2026 by llawliet-l-l via deploy #5569
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