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

Function maybeCleanupOwner

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

Source from the content-addressed store, hash-verified

495}
496
497function maybeCleanupOwner(ownerKey: string) {
498 const owner = ownerStates.get(ownerKey)
499 if (!owner) return
500 if (owner.queueLength === 0) {
501 removeOwnerFromRing(ownerKey)
502 }
503 if (owner.queueLength === 0 && owner.activeExecutions === 0) {
504 ownerStates.delete(ownerKey)
505 }
506}
507
508function removeQueueNode(node: QueueNode): QueuedExecution {
509 const owner = ownerStates.get(node.ownerKey)

Callers 6

removeQueueNodeFunction · 0.85
handleWorkerMessageFunction · 0.85
cleanupWorkerFunction · 0.85
dispatchToWorkerFunction · 0.85
drainQueueFunction · 0.85
executeInIsolatedVMFunction · 0.85

Calls 3

removeOwnerFromRingFunction · 0.85
getMethod · 0.65
deleteMethod · 0.65

Tested by

no test coverage detected