def flushmany():
    """Send a potentially huge number of pending signals over the message bus.

    This command assumes that the number of pending signals might be
    huge, so that they might not fit into memory. However, it is not
    very smart in handling concurrent senders. It is mostly useful
    when recovering from long periods of disconnectedness from the
    message bus.

    """

    signalbus = current_app.extensions['signalbus']
    signal_count = signalbus.flushmany()
    logger = logging.getLogger(__name__)
    if signal_count == 1:
        logger.warning('%i signal has been successfully processed.', signal_count)
    elif signal_count > 1:
        logger.warning('%i signals have been successfully processed.', signal_count)
Send a potentially huge number of pending signals over the message bus.

    This command assumes that the number of pending signals might be
    huge, so that they might not fit into memory. However, it is not
    very smart in handling concurrent senders. It is mostly useful
    when recovering from long periods of disconnectedness from the
    message bus.