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

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

Issue 2013943002: Changing license header, again! (Closed) Base URL: git@github.com:luci/luci-py.git@master
Patch Set: Fixed third parties 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 2014 The LUCI 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 under the Apache License, Version 2.0
3 # found in the LICENSE file. 3 # that can be found in the LICENSE file.
4 4
5 """Grab bag file for transaction.""" 5 """Grab bag file for transaction."""
6 6
7 import logging 7 import logging
8 8
9 from google.appengine.api import datastore_errors 9 from google.appengine.api import datastore_errors
10 from google.appengine.ext import ndb 10 from google.appengine.ext import ndb
11 from google.appengine.ext.ndb import tasklets 11 from google.appengine.ext.ndb import tasklets
12 from google.appengine.runtime import apiproxy_errors 12 from google.appengine.runtime import apiproxy_errors
13 13
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 """Decorator that wraps a function with txn.transaction.""" 80 """Decorator that wraps a function with txn.transaction."""
81 return transactional_async.wrapped_decorator( 81 return transactional_async.wrapped_decorator(
82 func, args, kwds, **ctx_options).get_result() 82 func, args, kwds, **ctx_options).get_result()
83 83
84 84
85 @ndb.utils.decorator 85 @ndb.utils.decorator
86 def transactional_tasklet(func, args, kwds, **options): 86 def transactional_tasklet(func, args, kwds, **options):
87 """The tasklet version of @txn.transactional_async.""" 87 """The tasklet version of @txn.transactional_async."""
88 func = tasklets.tasklet(func) 88 func = tasklets.tasklet(func)
89 return transactional_async.wrapped_decorator(func, args, kwds, **options) 89 return transactional_async.wrapped_decorator(func, args, kwds, **options)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698