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

Unified Diff: appengine/gce-backend/main.py

Issue 2247443002: Adds settings.cfg for gce-backend. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-py@gce_config_refactor
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/gce-backend/main.py
diff --git a/appengine/gce-backend/main.py b/appengine/gce-backend/main.py
index 4708838f9d89a763712556a82077bd879124fb3a..6357018ef6a3f5d131b86383393315234694d3bf 100644
--- a/appengine/gce-backend/main.py
+++ b/appengine/gce-backend/main.py
@@ -8,11 +8,16 @@ from components import utils
import gae_ts_mon
+import config
import handlers_cron
import handlers_endpoints
import handlers_queues
+def is_enabled_callback():
+ return config.settings().enable_ts_monitoring
+
+
def main():
utils.set_task_queue_module('default')
apps = (
@@ -22,7 +27,7 @@ def main():
)
for app in apps[1:]:
# Not callable on endpoints app
- gae_ts_mon.initialize(app=app)
+ gae_ts_mon.initialize(app=app, is_enabled_fn=is_enabled_callback)
return apps

Powered by Google App Engine
This is Rietveld 408576698