mirror of
https://github.com/mastra-ai/mastra.git
synced 2026-11-17 08:44:46 +00:00
feat(mcp): pin an 'auto' task's row to the worker running its first attempt
An 'auto' tool that outlives its sync window keeps running under the request while its row waits to be claimed. Unpinned, a peer's stale-task sweep could dispatch that pending row and run the tool a second time. The row is now enqueued with pinToWorker, so peers skip it while this worker's lease is live, and the sweeper settles a pinned row whose worker died like a running one: lost when recover is off, retried once when it is on. 'always' tasks and later attempts stay unpinned. Co-Authored-By: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
This commit is contained in:
parent
afb635f8e4
commit
d0984dcee7
5 changed files with 81 additions and 20 deletions
Loading…
Add table
Add a link
Reference in a new issue