diff --git a/util/queuemetrics.py b/util/queuemetrics.py index ce19b9e28..25db79b3c 100644 --- a/util/queuemetrics.py +++ b/util/queuemetrics.py @@ -49,8 +49,12 @@ class SendToCloudWatch(Thread): self._put_metrics_queue = request_queue def run(self): - logger.debug('Starting CloudWatch sender process.') - connection = boto.connect_cloudwatch(self._aws_access_key, self._aws_secret_key) + try: + logger.debug('Starting CloudWatch sender process.') + connection = boto.connect_cloudwatch(self._aws_access_key, self._aws_secret_key) + except: + logger.exception('Failed to connect to CloudWatch.') + while True: put_metric_args, kwargs = self._put_metrics_queue.get() logger.debug('Got queued put metrics request.')