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

Side by Side 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 unified diff | Download patch
OLDNEW
1 # Copyright 2015 The LUCI Authors. All rights reserved. 1 # Copyright 2015 The LUCI Authors. All rights reserved.
2 # Use of this source code is governed under the Apache License, Version 2.0 2 # Use of this source code is governed under the Apache License, Version 2.0
3 # that can be found in the LICENSE file. 3 # that can be found in the LICENSE file.
4 4
5 """Handlers for HTTP requests.""" 5 """Handlers for HTTP requests."""
6 6
7 from components import utils 7 from components import utils
8 8
9 import gae_ts_mon 9 import gae_ts_mon
10 10
11 import config
11 import handlers_cron 12 import handlers_cron
12 import handlers_endpoints 13 import handlers_endpoints
13 import handlers_frontend 14 import handlers_frontend
14 import handlers_queues 15 import handlers_queues
15 16
16 17
17 utils.set_task_queue_module('default') 18 utils.set_task_queue_module('default')
M-A Ruel 2016/08/09 19:22:41 I'd prefer, while at it, to refactor this file int
ryanmartens 2016/08/09 21:16:31 Agree that we should refactor this. What are your
18 19
19 cron_app = handlers_cron.create_cron_app() 20 cron_app = handlers_cron.create_cron_app()
20 endpoints_app = handlers_endpoints.create_endpoints_app() 21 endpoints_app = handlers_endpoints.create_endpoints_app()
21 frontend_app = handlers_frontend.create_frontend_app() 22 frontend_app = handlers_frontend.create_frontend_app()
22 queue_app = handlers_queues.create_queues_app() 23 queue_app = handlers_queues.create_queues_app()
23 24
24 gae_ts_mon.initialize(app=cron_app) 25 def is_enabled_callback():
25 gae_ts_mon.initialize(app=frontend_app) 26 return config.settings().enable_ts_monitoring
26 gae_ts_mon.initialize(app=queue_app) 27
28 gae_ts_mon.initialize(app=cron_app, is_enabled_fn=is_enabled_callback)
29 gae_ts_mon.initialize(app=frontend_app, is_enabled_fn=is_enabled_callback)
30 gae_ts_mon.initialize(app=queue_app, is_enabled_fn=is_enabled_callback)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698