Fix the queue query for old jobs which won't run.

This commit is contained in:
Jake Moshenko 2014-05-22 13:50:06 -04:00
parent f6726bd0a4
commit f4c488f9b6
2 changed files with 20 additions and 22 deletions

View file

@ -17,6 +17,8 @@ class CloudWatchReporter(object):
self._name = name
def report(self, running_count, total_count):
logger.debug('Worker indicated %s running count and %s total count', running_count,
total_count)
need_capacity_count = total_count - running_count
self._connection.put_metric_data(self._namespace, self._name, need_capacity_count,
unit='Count')