commit/galaxy-central: 2 new changesets
2 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/8b66d43bc2d1/ Changeset: 8b66d43bc2d1 Branch: next-stable User: dannon Date: 2014-05-20 17:55:24 Summary: When using AMQP, if the AMQP server goes down this will now more nicely catch the Connection refused error in send_control_task Affected #: 1 file diff -r 2ed7d87b4ddda2f32eb9d6fc8c05d74667842fef -r 8b66d43bc2d1e2119baa7589b6721e360840948e lib/galaxy/queue_worker.py --- a/lib/galaxy/queue_worker.py +++ b/lib/galaxy/queue_worker.py @@ -70,11 +70,16 @@ 'kwargs': kwargs} if noop_self: payload['noop'] = trans.app.config.server_name - c = Connection(trans.app.config.amqp_internal_connection) - with producers[c].acquire(block=True) as producer: - producer.publish(payload, exchange=galaxy.queues.galaxy_exchange, - declare=[galaxy.queues.galaxy_exchange] + galaxy.queues.all_control_queues_for_declare(trans.app.config), - routing_key='control') + try: + c = Connection(trans.app.config.amqp_internal_connection) + with producers[c].acquire(block=True) as producer: + producer.publish(payload, exchange=galaxy.queues.galaxy_exchange, + declare=[galaxy.queues.galaxy_exchange] + galaxy.queues.all_control_queues_for_declare(trans.app.config), + routing_key='control') + except Exception: + # This is likely connection refused. + # TODO Use the specific Exception above. + log.exception("Error sending control task: %s." % payload) # Tasks -- to be reorganized into a separate module as appropriate. This is https://bitbucket.org/galaxy/galaxy-central/commits/512424a01563/ Changeset: 512424a01563 User: dannon Date: 2014-05-20 17:55:54 Summary: Merge next-stable. Affected #: 1 file diff -r 37509e01ee5db4b0552537c77f3771b9671e5dae -r 512424a01563a2427fc0ff6225fde2737edc6900 lib/galaxy/queue_worker.py --- a/lib/galaxy/queue_worker.py +++ b/lib/galaxy/queue_worker.py @@ -70,11 +70,16 @@ 'kwargs': kwargs} if noop_self: payload['noop'] = trans.app.config.server_name - c = Connection(trans.app.config.amqp_internal_connection) - with producers[c].acquire(block=True) as producer: - producer.publish(payload, exchange=galaxy.queues.galaxy_exchange, - declare=[galaxy.queues.galaxy_exchange] + galaxy.queues.all_control_queues_for_declare(trans.app.config), - routing_key='control') + try: + c = Connection(trans.app.config.amqp_internal_connection) + with producers[c].acquire(block=True) as producer: + producer.publish(payload, exchange=galaxy.queues.galaxy_exchange, + declare=[galaxy.queues.galaxy_exchange] + galaxy.queues.all_control_queues_for_declare(trans.app.config), + routing_key='control') + except Exception: + # This is likely connection refused. + # TODO Use the specific Exception above. + log.exception("Error sending control task: %s." % payload) # Tasks -- to be reorganized into a separate module as appropriate. This is Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
commits-noreply@bitbucket.org