From 3648af0d3b5defb025cfd7871b6edccabab51417 Mon Sep 17 00:00:00 2001 From: John Chilton <jmchilton@gmail.com> Date: Mon, 16 Mar 2015 21:07:30 -0400 Subject: [PATCH] More logging around status message consumption. If there is some problem that causes the Pulsar client in the job handler to stop logging, this really should be logged now. --- pulsar/client/manager.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pulsar/client/manager.py b/pulsar/client/manager.py index ce25c264..403d4a70 100644 --- a/pulsar/client/manager.py +++ b/pulsar/client/manager.py @@ -118,8 +118,12 @@ class MessageQueueClientManager(object): message.ack() def run(): - self.exchange.consume("status_update", callback_wrapper, check=self) - log.debug("Leaving Pulsar client status update thread, no additional Pulsar updates will be processed.") + try: + self.exchange.consume("status_update", callback_wrapper, check=self) + except Exception: + log.exception("Exception while handling status update messages, this shouldn't really happen. Handler should be restarted.") + finally: + log.debug("Leaving Pulsar client status update thread, no additional Pulsar updates will be processed.") thread = threading.Thread( name="pulsar_client_%s_status_update_callback" % self.manager_name, -- GitLab