feat: implement Swapper metrics collection and UI
This commit is contained in:
16
services/city-service/repo_city.py_fragment_debug.py
Normal file
16
services/city-service/repo_city.py_fragment_debug.py
Normal file
@@ -0,0 +1,16 @@
|
||||
# Fetch MicroDAOs where orchestrator is on this node
|
||||
print(f"DEBUG: Fetching microdaos for node {node_id}")
|
||||
try:
|
||||
microdaos = await pool.fetch("""
|
||||
SELECT m.id, m.slug, m.name, COUNT(cr.id) as rooms_count
|
||||
FROM microdaos m
|
||||
JOIN agents a ON m.orchestrator_agent_id = a.id
|
||||
LEFT JOIN city_rooms cr ON cr.microdao_id::text = m.id
|
||||
WHERE a.node_id = $1
|
||||
GROUP BY m.id, m.slug, m.name
|
||||
ORDER BY m.name
|
||||
""", node_id)
|
||||
print(f"DEBUG: Microdaos fetched: {len(microdaos)}")
|
||||
except Exception as e:
|
||||
print(f"DEBUG: Error fetching microdaos: {e}")
|
||||
raise e
|
||||
Reference in New Issue
Block a user