Skip to content

armgit / ruflo

Public Imported from GitHub
0

🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

Checkpoint: File edits

rUv12ca138b0dc4
diff --git a/v3/@claude-flow/cli/src/services/worker-queue.ts b/v3/@claude-flow/cli/src/services/worker-queue.ts
index 0ed1707de0..b5d9790d86 100644
--- a/v3/@claude-flow/cli/src/services/worker-queue.ts
+++ b/v3/@claude-flow/cli/src/services/worker-queue.ts
@@ -148,10 +148,24 @@ class InMemoryStore {
private queues: Map<string, string[]> = new Map();
private workers: Map<string, WorkerRegistration> = new Map();
private results: Map<string, { result: HeadlessExecutionResult; expiresAt: number }> = new Map();
+ private cleanupTimer?: NodeJS.Timeout;
- constructor() {
- // Clean up expired results periodically
- setInterval(() => this.cleanupExpired(), 60000);
+ /**
+ * Start cleanup timer (called after initialization)
+ */
+ startCleanup(): void {
+ if (this.cleanupTimer) return;
+ this.cleanupTimer = setInterval(() => this.cleanupExpired(), 60000);
+ }
+
+ /**
+ * Stop cleanup timer
+ */
+ stopCleanup(): void {
+ if (this.cleanupTimer) {
+ clearInterval(this.cleanupTimer);
+ this.cleanupTimer = undefined;
+ }
}
// Task operations