From bb16165a83554cbba676217f704fc44ae188952f Mon Sep 17 00:00:00 2001 From: michael Date: Tue, 9 Dec 2025 11:51:23 -0600 Subject: [PATCH] Remove unused eventlet import and dead emit_with_ack function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Legacy code from Flask-SocketIO migration that's no longer used. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- backend/app/models/focus_group.py | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/backend/app/models/focus_group.py b/backend/app/models/focus_group.py index 4ffecdbc..78c27275 100644 --- a/backend/app/models/focus_group.py +++ b/backend/app/models/focus_group.py @@ -5,7 +5,6 @@ import traceback import uuid import os import threading -import eventlet import logging # Set up logger for this module @@ -51,22 +50,6 @@ async def emit_websocket_event(event_name: str, focus_group_id: str, data: dict) import traceback print(f"🔔 Full traceback: {traceback.format_exc()}") -def emit_with_ack(event_name: str, focus_group_id: str, payload: dict): - """GPT-5 Optional: Emit with client ACK to prove end-to-end delivery.""" - from app.extensions import socketio - - def _ack_callback(): - print(f"🔧 GPT-5 ACK: Client confirmed receipt of {event_name} for room {focus_group_id}") - - try: - socketio.emit(event_name, payload, room=focus_group_id, callback=_ack_callback, namespace='/') - eventlet.sleep(0) # GPT-5: Yield to eventlet for proper async handling - print(f"🔧 GPT-5: Emitted {event_name} with ACK callback for room {focus_group_id}") - except Exception as e: - print(f"WebSocket emit with ACK error for {event_name}: {e}") - import traceback - traceback.print_exc() - class FocusGroup: @staticmethod async def create(focus_group_data, user_id):