| OLD | NEW |
| 1 # Copyright 2013 The LUCI Authors. All rights reserved. | 1 # Copyright 2013 The LUCI Authors. All rights reserved. |
| 2 # Use of this source code is governed by the Apache v2.0 license that can be | 2 # Use of this source code is governed by the Apache v2.0 license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """Instance specific settings.""" | 5 """Instance specific settings.""" |
| 6 | 6 |
| 7 import logging | 7 import logging |
| 8 import posixpath | 8 import posixpath |
| 9 | 9 |
| 10 from components import config | 10 from components import config |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 return { | 99 return { |
| 100 'cfg': cfg, | 100 'cfg': cfg, |
| 101 'rev': rev, | 101 'rev': rev, |
| 102 'rev_url': rev_url, | 102 'rev_url': rev_url, |
| 103 'config_service_url': ( | 103 'config_service_url': ( |
| 104 'https://%s' % cfg_service_hostname if cfg_service_hostname else '' | 104 'https://%s' % cfg_service_hostname if cfg_service_hostname else '' |
| 105 ), | 105 ), |
| 106 } | 106 } |
| 107 | 107 |
| 108 | 108 |
| 109 @utils.cache_with_expiration(60) |
| 109 def settings(): | 110 def settings(): |
| 110 """Loads settings from an NDB-based cache or a default one if not present.""" | 111 """Loads settings from an NDB-based cache or a default one if not present.""" |
| 111 return _get_settings()[1] | 112 return _get_settings()[1] |
| OLD | NEW |