(agents: Agent[], intervalMinutes: number = 60)
| 130 | } |
| 131 | |
| 132 | startPeriodicCrawl(agents: Agent[], intervalMinutes: number = 60) { |
| 133 | // Initial crawl |
| 134 | this.crawlAllAgents(agents); |
| 135 | |
| 136 | // Periodic crawl |
| 137 | this.intervalId = setInterval(() => { |
| 138 | this.crawlAllAgents(agents); |
| 139 | }, intervalMinutes * 60 * 1000); |
| 140 | |
| 141 | log.info({ intervalMinutes }, 'Periodic crawl started'); |
| 142 | } |
| 143 | |
| 144 | stopPeriodicCrawl() { |
| 145 | if (this.intervalId) { |