Commit fe8a382b by Joseph Mulloy

Prevent put_metric_data with no data OPS-2545

parent 5a74672b
......@@ -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