MCPcopy Create free account
hub / github.com/CodeGraphContext/CodeGraphContext / stop

Method stop

website/src/lib/kuzu-coordinator.ts:188–217  ·  view source on GitHub ↗
(keepStarted = false)

Source from the content-addressed store, hash-verified

186 }
187
188 public async stop(keepStarted = false) {
189 if (!keepStarted) {
190 this.isStarted = false;
191 if (typeof window !== "undefined" && typeof document !== "undefined") {
192 document.removeEventListener("visibilitychange", this.handleVisibilityChange);
193 }
194 }
195
196 if (this.visibilityDebounceTimer) {
197 clearTimeout(this.visibilityDebounceTimer);
198 this.visibilityDebounceTimer = null;
199 }
200
201 const supabase = getSupabaseClient();
202
203 if (this.channel) {
204 console.log(`[KuzuCoordinator] Unsubscribing from query tunnel: ${this.channelName}`);
205 try {
206 await supabase.removeChannel(this.channel);
207 } catch {
208 /* ignore */
209 }
210 this.channel = null;
211 }
212
213 if (this.keepaliveInterval) {
214 clearInterval(this.keepaliveInterval);
215 this.keepaliveInterval = null;
216 }
217 }
218}

Callers 2

ExploreFunction · 0.95

Calls 2

getSupabaseClientFunction · 0.90
logMethod · 0.45

Tested by

no test coverage detected