Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(950)

Unified Diff: appengine/machine_provider/main.py

Issue 2225263004: Adds config component to Machine Provider (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-py@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: appengine/machine_provider/main.py
diff --git a/appengine/machine_provider/main.py b/appengine/machine_provider/main.py
index 5ed2f39f7379125bf1fdda1ad178c51352edbcfc..91dbd47be5fb1f5df20ef06f492997529919f180 100644
--- a/appengine/machine_provider/main.py
+++ b/appengine/machine_provider/main.py
@@ -8,6 +8,7 @@ from components import utils
import gae_ts_mon
+import config
import handlers_cron
import handlers_endpoints
import handlers_frontend
@@ -21,6 +22,9 @@ endpoints_app = handlers_endpoints.create_endpoints_app()
frontend_app = handlers_frontend.create_frontend_app()
queue_app = handlers_queues.create_queues_app()
-gae_ts_mon.initialize(app=cron_app)
-gae_ts_mon.initialize(app=frontend_app)
-gae_ts_mon.initialize(app=queue_app)
+def is_enabled_callback():
+ return config.settings().enable_ts_monitoring
+
+gae_ts_mon.initialize(app=cron_app, is_enabled_fn=is_enabled_callback)
+gae_ts_mon.initialize(app=frontend_app, is_enabled_fn=is_enabled_callback)
+gae_ts_mon.initialize(app=queue_app, is_enabled_fn=is_enabled_callback)

Powered by Google App Engine
This is Rietveld 408576698