From 0598f0ca7472a2f867f594780a2ba3fe091b8b6e Mon Sep 17 00:00:00 2001 From: Charlton Austin Date: Tue, 24 Jan 2017 16:31:33 -0500 Subject: [PATCH] feature(app.py): adding queue_metrics to queues publishing queue metrics for SRE [none] --- app.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app.py b/app.py index e84b010a9..dc604ee27 100644 --- a/app.py +++ b/app.py @@ -175,13 +175,13 @@ Principal(app, use_sessions=False) tf = app.config['DB_TRANSACTION_FACTORY'] -chunk_cleanup_queue = WorkQueue(app.config['CHUNK_CLEANUP_QUEUE_NAME'], tf) avatar = Avatar(app) login_manager = LoginManager(app) mail = Mail(app) prometheus = PrometheusPlugin(app) metric_queue = MetricQueue(prometheus) +chunk_cleanup_queue = WorkQueue(app.config['CHUNK_CLEANUP_QUEUE_NAME'], tf, metric_queue=metric_queue) instance_keys = InstanceKeys(app) storage = Storage(app, metric_queue, chunk_cleanup_queue, instance_keys) userfiles = Userfiles(app, storage) @@ -217,9 +217,11 @@ image_replication_queue = WorkQueue(app.config['REPLICATION_QUEUE_NAME'], tf, dockerfile_build_queue = WorkQueue(app.config['DOCKERFILE_BUILD_QUEUE_NAME'], tf, reporter=BuildMetricQueueReporter(metric_queue), has_namespace=True) -notification_queue = WorkQueue(app.config['NOTIFICATION_QUEUE_NAME'], tf, has_namespace=True) +notification_queue = WorkQueue(app.config['NOTIFICATION_QUEUE_NAME'], tf, has_namespace=True, + metric_queue=metric_queue) secscan_notification_queue = WorkQueue(app.config['SECSCAN_NOTIFICATION_QUEUE_NAME'], tf, - has_namespace=False) + has_namespace=False, + metric_queue=metric_queue) all_queues = [image_replication_queue, dockerfile_build_queue, notification_queue, secscan_notification_queue, chunk_cleanup_queue]