def update_pipe_channel(self, uid, channel_name, label): # pylint: disable=unused-argument
        '''
        Update this consumer to listen on channel_name for the js widget associated with uid
        '''
        pipe_group_name = _form_pipe_channel_name(channel_name)

        if self.channel_layer:
            current = self.channel_maps.get(uid, None)
            if current != pipe_group_name:
                if current:
                    async_to_sync(self.channel_layer.group_discard)(current, self.channel_name)

                self.channel_maps[uid] = pipe_group_name
                async_to_sync(self.channel_layer.group_add)(pipe_group_name, self.channel_name)
def update_pipe_channel ( self , uid , channel_name , label ) : pipe_group_name = _form_pipe_channel_name ( channel_name ) if self . channel_layer : current = self . channel_maps . get ( uid , None ) if current != pipe_group_name : if current : async_to_sync ( self . channel_layer . group_discard ) ( current , self . channel_name ) self . channel_maps [ uid ] = pipe_group_name async_to_sync ( self . channel_layer . group_add ) ( pipe_group_name , self . channel_name )
Update this consumer to listen on channel_name for the js widget associated with uid