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

Side by Side Diff: appengine/third_party/gae_ts_mon/shared.py

Issue 2013943002: Changing license header, again! (Closed) Base URL: git@github.com:luci/luci-py.git@master
Patch Set: Created 4 years, 7 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 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # that can be found in the LICENSE file.
4 4
5 import contextlib 5 import contextlib
6 6
7 from google.appengine.api import modules 7 from google.appengine.api import modules
8 from google.appengine.api import namespace_manager 8 from google.appengine.api import namespace_manager
9 from google.appengine.ext import ndb 9 from google.appengine.ext import ndb
10 10
11 from infra_libs.ts_mon.common import metrics 11 from infra_libs.ts_mon.common import metrics
12 12
13 REGION = 'appengine' 13 REGION = 'appengine'
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 try: 107 try:
108 namespace_manager.set_namespace(INSTANCE_NAMESPACE) 108 namespace_manager.set_namespace(INSTANCE_NAMESPACE)
109 yield 109 yield
110 finally: 110 finally:
111 namespace_manager.set_namespace(previous_namespace) 111 namespace_manager.set_namespace(previous_namespace)
112 112
113 113
114 def get_instance_entity(): 114 def get_instance_entity():
115 with instance_namespace_context(): 115 with instance_namespace_context():
116 return Instance.get_or_insert(instance_key_id()) 116 return Instance.get_or_insert(instance_key_id())
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698