Don't enable the metric queue if there's no Cloudwatch
This commit is contained in:
parent
b483209862
commit
f043bc1379
3 changed files with 15 additions and 4 deletions
|
@ -7,7 +7,7 @@ from threading import Thread
|
|||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
def send_cloudwatch(metrics, app):
|
||||
def start_cloudwatch_sender(metrics, app):
|
||||
"""
|
||||
Starts sending from metrics to a new CloudWatchSender.
|
||||
"""
|
||||
|
@ -37,6 +37,7 @@ class CloudWatchSender(Thread):
|
|||
connection = boto.connect_cloudwatch(self._aws_access_key, self._aws_secret_key)
|
||||
except:
|
||||
logger.exception('Failed to connect to CloudWatch.')
|
||||
self._metrics.enable()
|
||||
|
||||
while True:
|
||||
put_metric_args, kwargs = self._metrics.get()
|
||||
|
|
Reference in a new issue