routing.py 430 Bytes
from django.urls import path, re_path
from .views import AgentCmdViewSet
from .consumers import AgentCmdConsumer, AgentSurveyConsumer, AgentSurveyDetailConsumer


websocket_urlpatterns = [
    re_path(r"^ws/agent_cmd/(?P<agent_name>\w+)/$", AgentCmdConsumer.as_asgi()),
    re_path(r"^ws/agent_survey/(?P<agent_name>\w+)/$", AgentSurveyDetailConsumer.as_asgi()),
    re_path(r"^ws/agent_survey/", AgentSurveyConsumer.as_asgi()),
]