anderson-ufrj
commited on
Commit
·
3e7de94
1
Parent(s):
b088ee1
fix(cache): correct cache_result decorator parameters
Browse filesChange ttl_seconds to ttl and add required prefix parameter
to match the expected signature of cache_result decorator
src/services/agent_metrics.py
CHANGED
|
@@ -216,7 +216,7 @@ class AgentMetricsService:
|
|
| 216 |
# Update Prometheus metric
|
| 217 |
agent_memory_usage.labels(agent_name=agent_name).set(memory_bytes)
|
| 218 |
|
| 219 |
-
@cache_result(
|
| 220 |
async def get_agent_stats(self, agent_name: str) -> Dict[str, Any]:
|
| 221 |
"""Get comprehensive stats for a specific agent."""
|
| 222 |
async with self._lock:
|
|
|
|
| 216 |
# Update Prometheus metric
|
| 217 |
agent_memory_usage.labels(agent_name=agent_name).set(memory_bytes)
|
| 218 |
|
| 219 |
+
@cache_result(prefix="agent_stats", ttl=30)
|
| 220 |
async def get_agent_stats(self, agent_name: str) -> Dict[str, Any]:
|
| 221 |
"""Get comprehensive stats for a specific agent."""
|
| 222 |
async with self._lock:
|