* Stop the idle compaction checker.
()
| 94 | * Stop the idle compaction checker. |
| 95 | */ |
| 96 | stop(): void { |
| 97 | this.stopped = true; |
| 98 | |
| 99 | if (this.initialTimeout) { |
| 100 | clearTimeout(this.initialTimeout); |
| 101 | this.initialTimeout = null; |
| 102 | } |
| 103 | if (this.checkInterval) { |
| 104 | clearInterval(this.checkInterval); |
| 105 | this.checkInterval = null; |
| 106 | } |
| 107 | |
| 108 | // Best-effort queue reset: do not start new compactions after stop(). |
| 109 | this.queue.length = 0; |
| 110 | this.queuedWorkspaceIds.clear(); |
| 111 | |
| 112 | log.info("IdleCompactionService stopped"); |
| 113 | } |
| 114 | |
| 115 | /** |
| 116 | * Check all workspaces across all projects for idle compaction eligibility. |