From 18e8fdb0a39f7034ca75c37881e3922fff17c698 Mon Sep 17 00:00:00 2001 From: Ryan Kegel Date: Tue, 9 Dec 2025 16:01:26 -0500 Subject: [PATCH] attempting proxying --- events/sse.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/events/sse.py b/events/sse.py index 573b66a..960a1cd 100644 --- a/events/sse.py +++ b/events/sse.py @@ -2,6 +2,7 @@ import json import queue import uuid from typing import Dict, Any +import logging from flask import Response @@ -9,6 +10,7 @@ from events.types.event import Event # Maps user_id → dict of {connection_id: queue} user_queues: Dict[str, Dict[str, queue.Queue]] = {} +logging.basicConfig(level=logging.INFO) def get_queue(user_id: str, connection_id: str) -> queue.Queue: @@ -53,6 +55,8 @@ def sse_response_for_user(user_id: str): while True: # Get message from queue (blocks until available) message = user_queue.get() + logging.info( + f"Sending SSE message to user {user_id} (connection {connection_id}): {message.decode('utf-8').strip()}") yield message except GeneratorExit: # Clean up when client disconnects