Code review
This commit is contained in:
parent
f043bc1379
commit
7c3b555ee9
3 changed files with 14 additions and 14 deletions
|
@ -11,9 +11,13 @@ def start_cloudwatch_sender(metrics, app):
|
|||
"""
|
||||
Starts sending from metrics to a new CloudWatchSender.
|
||||
"""
|
||||
access_key = app.config['CLOUDWATCH_AWS_ACCESS_KEY']
|
||||
secret_key = app.config['CLOUDWATCH_AWS_SECRET_KEY']
|
||||
namespace = app.config['CLOUDWATCH_NAMESPACE']
|
||||
try:
|
||||
access_key = app.config['CLOUDWATCH_AWS_ACCESS_KEY']
|
||||
secret_key = app.config['CLOUDWATCH_AWS_SECRET_KEY']
|
||||
namespace = app.config['CLOUDWATCH_NAMESPACE']
|
||||
except KeyError:
|
||||
logger.debug('Cloudwatch not configured')
|
||||
return
|
||||
|
||||
sender = CloudWatchSender(metrics, access_key, secret_key, namespace)
|
||||
sender.start()
|
||||
|
|
Reference in a new issue