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

Side by Side Diff: appengine/components/components/datastore_utils/config.py

Issue 1860863002: Update copyright notice from Swarming to LUCI; add AUTHORS and CONTRIBUTORS. (Closed) Base URL: git@github.com:luci/luci-py.git@master
Patch Set: . Created 4 years, 8 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 2014 The Swarming Authors. All rights reserved. 1 # Copyright 2014 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 """Versioned singleton entity with global application configuration. 5 """Versioned singleton entity with global application configuration.
6 6
7 Example usage: 7 Example usage:
8 from components.datastore_utils import config 8 from components.datastore_utils import config
9 9
10 class MyConfig(config.GlobalConfig): 10 class MyConfig(config.GlobalConfig):
11 param1 = ndb.StringProperty() 11 param1 = ndb.StringProperty()
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 150
151 _config_fetcher_async = None 151 _config_fetcher_async = None
152 152
153 @classmethod 153 @classmethod
154 def _get_root_model(cls): 154 def _get_root_model(cls):
155 return datastore_utils.get_versioned_root_model('%sRoot' % cls.__name__) 155 return datastore_utils.get_versioned_root_model('%sRoot' % cls.__name__)
156 156
157 @classmethod 157 @classmethod
158 def _get_root_key(cls): 158 def _get_root_key(cls):
159 return ndb.Key(cls._get_root_model(), 1) 159 return ndb.Key(cls._get_root_model(), 1)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698