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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « appengine/gce-backend/config.py ('k') | appengine/gce-backend/proto/Makefile » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_queues 14 import handlers_queues
14 15
15 16
17 def is_enabled_callback():
18 return config.settings().enable_ts_monitoring
19
20
16 def main(): 21 def main():
17 utils.set_task_queue_module('default') 22 utils.set_task_queue_module('default')
18 apps = ( 23 apps = (
19 handlers_endpoints.create_endpoints_app(), 24 handlers_endpoints.create_endpoints_app(),
20 handlers_cron.create_cron_app(), 25 handlers_cron.create_cron_app(),
21 handlers_queues.create_queues_app(), 26 handlers_queues.create_queues_app(),
22 ) 27 )
23 for app in apps[1:]: 28 for app in apps[1:]:
24 # Not callable on endpoints app 29 # Not callable on endpoints app
25 gae_ts_mon.initialize(app=app) 30 gae_ts_mon.initialize(app=app, is_enabled_fn=is_enabled_callback)
26 return apps 31 return apps
27 32
28 33
29 endpoints_app, cron_app, queues_app = main() 34 endpoints_app, cron_app, queues_app = main()
OLDNEW
« no previous file with comments | « appengine/gce-backend/config.py ('k') | appengine/gce-backend/proto/Makefile » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698