MCPcopy Index your code
hub / github.com/tiann/hapi / cleanup

Method cleanup

cli/src/opencode/utils/opencodeStorageScanner.ts:153–166  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

151 }
152
153 async cleanup(): Promise<void> {
154 if (this.intervalId) {
155 clearInterval(this.intervalId);
156 this.intervalId = null;
157 }
158 if (this.db) {
159 try {
160 this.db.close();
161 this.db = null;
162 } catch {
163 // ignore
164 }
165 }
166 }
167
168 async onNewSession(sessionId: string): Promise<void> {
169 if (!sessionId || sessionId === this.activeSessionId) {

Callers 1

Calls 1

closeMethod · 0.65

Tested by

no test coverage detected