Try/Catch creating connection to CloudWatch
This commit is contained in:
parent
33088f742a
commit
fe9e19704b
1 changed files with 6 additions and 2 deletions
|
@ -49,8 +49,12 @@ class SendToCloudWatch(Thread):
|
||||||
self._put_metrics_queue = request_queue
|
self._put_metrics_queue = request_queue
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
logger.debug('Starting CloudWatch sender process.')
|
try:
|
||||||
connection = boto.connect_cloudwatch(self._aws_access_key, self._aws_secret_key)
|
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:
|
while True:
|
||||||
put_metric_args, kwargs = self._put_metrics_queue.get()
|
put_metric_args, kwargs = self._put_metrics_queue.get()
|
||||||
logger.debug('Got queued put metrics request.')
|
logger.debug('Got queued put metrics request.')
|
||||||
|
|
Reference in a new issue