Unverified Commit 09a00278 by Joseph Mulloy Committed by GitHub

Merge pull request #4278 from edx/jdmulloy/ops2545/fix_redis_script

Jdmulloy/ops2545/fix redis script
parents 3e2bcc07 fe8a382b
......@@ -73,7 +73,7 @@ class CwBotoWrapper(object):
help='Maximum number of CloudWatch metrics to publish')
@click.option('--threshold', default=50,
help='Maximum queue length before alarm notification is sent')
@click.option('--sns-arn', '-s', help='ARN for SNS alert topic')
@click.option('--sns-arn', '-s', help='ARN for SNS alert topic', required=True)
def check_queues(host, port, environment, deploy, max_metrics, threshold,
sns_arn):
timeout = 1
......@@ -117,7 +117,8 @@ def check_queues(host, port, environment, deploy, max_metrics, threshold,
'Value': redis_client.llen(queue)
})
cloudwatch.put_metric_data(Namespace=namespace, MetricData=metric_data)
if len(metric_data) > 0:
cloudwatch.put_metric_data(Namespace=namespace, MetricData=metric_data)
for queue in queues:
dimensions = [{'Name': dimension, 'Value': queue}]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment