feat: bump client-services (accumulated feature work + deploy fixes)
Snapshot of in-progress work across local_backend, manager_dashboard, and waiter_pwa (pricing, chat, fiscal, prep zones, recovery codes, CRM, inventory, permissions), plus the nginx/docker-compose deploy fixes for the Unraid + NPM reverse-proxy setup. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -54,8 +54,14 @@ async def unsubscribe(user_id: int, q: asyncio.Queue) -> None:
|
||||
def broadcast_sync(event_type: str, data: dict, *, user_ids: list[int] | None = None) -> None:
|
||||
"""
|
||||
Fire-and-forget broadcast from a synchronous FastAPI route (thread-pool worker).
|
||||
Uses call_soon_threadsafe so the coroutine runs on the main event loop, not the thread.
|
||||
Delegates to ws_bus which persists the event and pushes to WS clients.
|
||||
Also pushes to legacy SSE clients so the old endpoint keeps working during transition.
|
||||
"""
|
||||
# WS bus handles persistence + WS delivery
|
||||
from services.ws_bus import broadcast_sync as ws_broadcast_sync
|
||||
ws_broadcast_sync(event_type, data, user_ids=user_ids)
|
||||
|
||||
# Legacy SSE push (no persistence needed — WS is the source of truth)
|
||||
if _main_loop is None:
|
||||
return
|
||||
_main_loop.call_soon_threadsafe(
|
||||
|
||||
Reference in New Issue
Block a user