我正在使用django-channels> = 2.0.0,我想在“ room1”中查找多少个用户。我不知道如何找到全部连接。
在consumer内部,您可以使用:]检查已将多少个连接添加到您的通道层中
consumer
len(self.channel_layer.groups.get('room1').items())