feat: Enhance review process with streaming events and detailed logging

This commit is contained in:
Primakov Alexandr Alexandrovich
2025-10-13 17:26:41 +03:00
parent a762d09b3b
commit 2f29ccff74
10 changed files with 309 additions and 205 deletions
+15 -3
View File
@@ -29,11 +29,23 @@ class ConnectionManager:
async def broadcast(self, message: dict):
"""Broadcast message to all connected clients"""
for connection in self.active_connections:
print(f"\n[BROADCAST] Sending to {len(self.active_connections)} clients")
print(f"[BROADCAST] Message type: {message.get('type')}")
print(f"[BROADCAST] Message: {str(message)[:200]}...")
sent_count = 0
error_count = 0
for i, connection in enumerate(self.active_connections):
try:
await connection.send_json(message)
except Exception:
pass
sent_count += 1
print(f"[BROADCAST] ✓ Sent to client #{i+1}")
except Exception as e:
error_count += 1
print(f"[BROADCAST] ✗ Failed to send to client #{i+1}: {e}")
print(f"[BROADCAST] Result: {sent_count} sent, {error_count} failed")
# Create connection manager