| OLD | NEW |
| 1 # Copyright 2013 The Swarming 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 from google.appengine.ext import ndb | 7 from google.appengine.ext import ndb |
| 8 | 8 |
| 9 from components.datastore_utils import config | 9 from components.datastore_utils import config |
| 10 | 10 |
| 11 | 11 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 | 27 |
| 28 def settings(fresh=False): | 28 def settings(fresh=False): |
| 29 """Loads GlobalConfig or a default one if not present. | 29 """Loads GlobalConfig or a default one if not present. |
| 30 | 30 |
| 31 If fresh=True, a full fetch from NDB is done. | 31 If fresh=True, a full fetch from NDB is done. |
| 32 """ | 32 """ |
| 33 if fresh: | 33 if fresh: |
| 34 GlobalConfig.clear_cache() | 34 GlobalConfig.clear_cache() |
| 35 return GlobalConfig.cached() | 35 return GlobalConfig.cached() |
| OLD | NEW |