(self, queued, url, acs_url, tags=None, label_tags=None, group=None)
Ensure `marathon.queue.count` is reported as zero for apps without queued instances.
Ensure `marathon.queue.count` is reported as zero for apps without queued instances.
Ensure marathon . queue . count is reported as zero for apps without queued instances .
def ensure_queue_count(self, queued, url, acs_url, tags=None, label_tags=None, group=None):
        """
        Ensure `marathon.queue.count` is reported as zero for apps without queued instances.
        """
        metric_name = '{}.count'.format(self.QUEUE_PREFIX)

        apps_response = self.get_apps_json(url, acs_url, tags, group)

        for app in apps_response['apps']:
            if app['id'] not in queued:
                q_tags = self.get_app_tags(app, tags, label_tags)
                self.gauge(metric_name, 0, tags=q_tags)
def ensure_queue_count ( self , queued , url , acs_url , tags = None , label_tags = None , group = None ) : metric_name = '{}.count' . format ( self . QUEUE_PREFIX ) apps_response = self . get_apps_json ( url , acs_url , tags , group ) for app in apps_response [ 'apps' ] : if app [ 'id' ] not in queued : q_tags = self . get_app_tags ( app , tags , label_tags ) self . gauge ( metric_name , 0 , tags = q_tags )