-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Description:
Currently, the /classified websocket route handles connection and disconnection events, but does not proactively send any existing classified mission data to the newly connected client. This means a client connecting to /classified may not immediately know of the most recent classified mission, leading to potential synchronization issues and a delayed view of mission status.
Proposed Solution:
Upon a new WebSocket connection to /classified, the classified_missions_ws endpoint should retrieve and send the last known classified mission (if any) to the client immediately after the connection is established. This ensures the client has the most up-to-date information from the moment it connects.
Implementation Details:
- Modify the
classified_missions_wsendpoint to call a new service method (e.g.,get_latest_classified_mission()) to retrieve the latest classified mission data. - After establishing the WebSocket connection, send the retrieved mission data to the client.
- Ensure this retrieval and send operation does not block or significantly delay the connection establishment. It's important that the websocket connection is fully established.
Affected Files:
app/api/v1/endpoints/missions.py- Potentially
app/services/missions/flow.pyif the recent mission retrieval logic resides there.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels