title: Django channels : why is channel_layer.gruop_send getting skipped?
body: <p>I'm trying to send message though websocket in django-channgels using <strong>channel-layers</strong> but its getting skipped and doesn't even show any exception or error.</p>
  
  <p>I have tried to make it work even in without async and with async but none works.</p>
  
  <pre class="lang-py prettyprint-override"><code>class stock_consumer(AsyncWebsocketConsumer):
  
     channel_layer = get_channel_layer()
  
     async def websocket_connect(self, event):
        await self.accept()
        await self.channel_layer.group_add("stock_group", self.channel_name)
        u = stock_market(api_key, access_token)    
        u.subscribe(u.get_instrument_by_symbol('NYSE', 'AAPL'))
        u.start_websocket(True)
        def quote_update(message):
           stock_consumer.send_message(self, message)
        u.set_on_quote_update(quote_update)
  
     async def websocket_receive(self, event):
        print(event)
  
     async def websocket_disconnect(self, message):
        await self.channel_layer.group_discard('stock_grogup', self.channel_name)
        await self.close()
  
     def send_message(self, message):
        print("before") //runs
  
        ***SKIPPED BLOCK START***
        self.channel_layer.group_send("stock_group", {
           "type": "send_message",
           "text": json.dumps(message)    
        })
        ***SKIPPED BLOCK END***
  
        print("after") //runs
  </code></pre>