Trying to call a consumer method inside a SyncConsumer class
def alert_receive(self, event): # Get a message of the
alert.receive type off of channel_layers
content = json.dumps("Group send working")
self.send({
"type":"websocket.send",#
Trying to call the "alert_receive" consumer method
import json
from channels.consumer import SyncConsumer
from channels.exceptions import StopConsumer
from asgiref.sync import async_to_sync
from channels.layers import get_channel_layer
class ClientAlertPtrConsumer(SyncConsumer):
def websocke
2 matches
Mail list logo