MCPcopy Create free account
hub / github.com/agent-tower/core / destroyAll

Method destroyAll

packages/server/src/services/session-manager.ts:578–590  ·  view source on GitHub ↗

* Destroy all active pipelines. Called on graceful server shutdown.

()

Source from the content-addressed store, hash-verified

576 /** Close all runtime driver sessions during graceful server shutdown. */
577 async destroyAll(): Promise<void> {
578 await this.runtimeCoordinator.destroyAll();
579 await Promise.allSettled(this.externalSessionPersistence.values());
580 this.externalSessionPersistence.clear();
581 this.terminalSessions.clear();
582 for (const resolve of this.pendingAutoCommitResolvers.values()) resolve();
583 this.pendingAutoCommitResolvers.clear();
584 this.pendingAutoCommits.clear();
585 for (const release of [...this.followUpReservationReleases]) release();
586 this.followUpReservationReleases.clear();
587 this.followUpReservations.clear();
588 clearAgentApiCredentials();
589 }
590
591 private resolveAgentSessionId(sessionId: string, logSnapshot: string | null): string | null {
592 const msgStore = sessionMsgStoreManager.get(sessionId);
593 if (msgStore) {

Callers 2

closeSocketFunction · 0.45

Calls 3

getMethod · 0.45
cancelMethod · 0.45
destroyMethod · 0.45

Tested by

no test coverage detected