@classmethod
def send_all(cls, force=False):
    """Send all pending documents to the recipients."""
    if force:
        documents = cls.query
    else:
        documents = cls.query.filter(cls.to_be_send)
    documents = documents.order_by(cls.priority)
    for document in documents:
        fragments = document.send(force=force)
        try:
            for fragment in fragments:
                yield fragment
        except GeneratorExit:
            fragments.close()
            raise
