Skip to content

Commit 73eab54

Browse files
committed
Add websocket.py compatibility module to fix import issues in production environment
1 parent 80ea921 commit 73eab54

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

backend/websocket.py

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
"""
2+
Websocket module for compatibility
3+
4+
This file exists to make imports like `from backend.websocket import X` work
5+
when the code is deployed in different environments.
6+
"""
7+
8+
# Re-export everything from the websocket package
9+
from backend.websocket import (
10+
socketio,
11+
init_websocket,
12+
send_notification,
13+
send_broadcast_notification,
14+
get_connected_users,
15+
get_connection_stats,
16+
is_user_connected,
17+
get_user_notifications,
18+
mark_notification_read,
19+
delete_notification,
20+
get_notification_stats,
21+
NOTIFICATION_TYPES,
22+
NOTIFICATION_TYPE_INFO,
23+
NOTIFICATION_TYPE_SUCCESS,
24+
NOTIFICATION_TYPE_WARNING,
25+
NOTIFICATION_TYPE_ERROR,
26+
CATEGORY_IMMIGRATION,
27+
CATEGORY_DOCUMENTS,
28+
CATEGORY_MESSAGES,
29+
CATEGORY_SYSTEM,
30+
CATEGORY_CASE,
31+
CATEGORY_APPOINTMENT,
32+
send_user_notification,
33+
send_case_status_update,
34+
send_document_request,
35+
send_document_uploaded_notification,
36+
send_appointment_reminder,
37+
send_message_notification,
38+
send_immigration_form_notification
39+
)

0 commit comments

Comments
 (0)