operations_project/apps/message/routing.py

12 lines
388 B
Python
Raw Normal View History

2025-05-08 17:25:32 +08:00
# apps/message/routing.py
from django.urls import re_path
from apps.message.consumers import NotificationConsumer
from apps.chat.consumers import ChatStreamConsumer # 直接导入已有的ChatStreamConsumer
import logging
websocket_urlpatterns = [
re_path(r'^ws/notifications/$', NotificationConsumer.as_asgi()),
re_path(r'^ws/chat/stream/$', ChatStreamConsumer.as_asgi()),
]