'Tries to continually dispatch messages to consumers.'

def run(self):

    if self.signal_handlers:
        self.install_signal_handler()
    channels = self.apply_channel_filters(self.channel_layer.router.channels)
    logger.info(u'Listening    on    channels    %s', u',    '.join(sorted(channels)))
    while (not self.termed):
        self.in_job = False
        (channel, content) = self.channel_layer.receive_many(channels, block=True)
        self.in_job = True
        if (channel is None):
            time.sleep(0.01)
            continue
        logger.debug(u'Got    message    on    %s    (reply    %s)', channel, content.get(u'reply_channel', u'none'))
        message = Message(content=content, channel_name=channel, channel_layer=self.channel_layer)
        if (content.get(u'__retries__', 0) == self.message_retries):
            message.__doomed__ = True
        match = self.channel_layer.router.match(message)
        if (match is None):
            logger.error(u'Could    not    find    match    for    message    on    %s!    Check    your    routing.', channel)
            continue
        else:
            (consumer, kwargs) = match
        if self.callback:
            self.callback(channel, message)
        try:
            logger.debug(u'Dispatching    message    on    %s    to    %s', channel, name_that_thing(consumer))
            consumer_started.send(sender=self.__class__, environ={})
            consumer(message, **kwargs)
        except DenyConnection:
            if (message.channel.name != u'websocket.connect'):
                raise ValueError(u'You    cannot    DenyConnection    from    a    non-websocket.connect    handler.')
            message.reply_channel.send({u'close': True})
        except ChannelSocketException as e:
            e.run(message)
        except ConsumeLater:
            content[u'__retries__'] = (content.get(u'__retries__', 0) + 1)
            if (content[u'__retries__'] > self.message_retries):
                logger.warning(u'Exceeded    number    of    retries    for    message    on    channel    %s:    %s', channel, repr(content)[:100])
                continue
            for _ in range(10):
                try:
                    self.channel_layer.send(channel, content)
                except self.channel_layer.ChannelFull:
                    time.sleep(0.05)
                else:
                    break
        except:
            logger.exception(u'Error    processing    message    with    consumer    %s:', name_that_thing(consumer))
        finally:
            consumer_finished.send(sender=self.__class__)
