django / channels

Developer-friendly asynchrony for Django
https://channels.readthedocs.io
BSD 3-Clause "New" or "Revised" License
6.01k stars 793 forks source link

adding a check if group_name exists method for channel_layer #2066

Closed ninjia0 closed 6 months ago

ninjia0 commented 6 months ago

I have been searching the internet, but I couldn't find a way to check if a specific group name exists in the channel_layer. Are there any methods or approaches to accomplish this?

carltongibson commented 6 months ago

It's not part of the Channel Layer API.

Assuming you're using the PubSub Redis Layer, you could (as one idea) build something around the PUBSUB CHANNELS command. (Apply similar to your needs.)