(agents: any[])
| 8759 | } |
| 8760 | |
| 8761 | private async prewarmCaches(agents: any[]): Promise<void> { |
| 8762 | await Promise.all( |
| 8763 | agents.map(async (agent) => { |
| 8764 | try { |
| 8765 | // Warm health and stats caches |
| 8766 | await Promise.all([ |
| 8767 | this.healthChecker.checkHealth(agent), |
| 8768 | this.healthChecker.getStats(agent), |
| 8769 | this.capabilityDiscovery.discoverCapabilities(agent), |
| 8770 | ]); |
| 8771 | |
| 8772 | // Warm type-specific caches |
| 8773 | if (agent.type === "buying") { |
| 8774 | await this.propertiesService.getPropertiesForAgent(agent); |
| 8775 | } |
| 8776 | } catch (error) { |
| 8777 | // Errors are expected for offline agents, just continue |
| 8778 | } |
| 8779 | }) |
| 8780 | ); |
| 8781 | } |
| 8782 | } |
no test coverage detected