MCPcopy Index your code
hub / github.com/simstudioai/sim / removeOwnerFromRing

Function removeOwnerFromRing

apps/sim/lib/execution/isolated-vm.ts:482–495  ·  view source on GitHub ↗
(ownerKey: string)

Source from the content-addressed store, hash-verified

480}
481
482function removeOwnerFromRing(ownerKey: string) {
483 const idx = queuedOwnerRing.indexOf(ownerKey)
484 if (idx === -1) return
485 queuedOwnerRing.splice(idx, 1)
486 if (queuedOwnerRing.length === 0) {
487 queuedOwnerCursor = 0
488 return
489 }
490 if (idx < queuedOwnerCursor) {
491 queuedOwnerCursor--
492 } else if (queuedOwnerCursor >= queuedOwnerRing.length) {
493 queuedOwnerCursor = 0
494 }
495}
496
497function maybeCleanupOwner(ownerKey: string) {
498 const owner = ownerStates.get(ownerKey)

Callers 2

maybeCleanupOwnerFunction · 0.85
selectOwnerForDispatchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected