예제 #1
0
def publish(feed, contributor):
    """
    send RT feed to navitia
    """
    try:
        kirin.rabbitmq_handler.publish(feed.SerializeToString(), contributor)
    except socket.error:
        logging.getLogger(__name__).exception('impossible to publish in rabbitmq')
        raise MessageNotPublished()
예제 #2
0
def publish(feed, contributor_id):
    """
    send RT feed to navitia
    """
    try:
        kirin.rmq_handler.publish(feed, contributor_id)

    except socket.error:
        logging.getLogger(__name__).exception(
            "impossible to publish in rabbitmq", extra={"contributor": contributor_id}
        )
        raise MessageNotPublished()