MCPcopy
hub / github.com/coder/mux / deleteSessionUsage

Method deleteSessionUsage

src/node/services/sessionUsageService.ts:515–525  ·  view source on GitHub ↗

* Delete session usage file (when workspace is deleted).

(workspaceId: string)

Source from the content-addressed store, hash-verified

513 * Delete session usage file (when workspace is deleted).
514 */
515 async deleteSessionUsage(workspaceId: string): Promise<void> {
516 return this.fileLocks.withLock(workspaceId, async () => {
517 try {
518 await fs.unlink(this.getFilePath(workspaceId));
519 } catch (error) {
520 if (!(error && typeof error === "object" && "code" in error && error.code === "ENOENT")) {
521 throw error;
522 }
523 }
524 });
525 }
526}

Callers

nothing calls this directly

Calls 2

getFilePathMethod · 0.95
withLockMethod · 0.80

Tested by

no test coverage detected