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

Unified Diff: impl/prod/taskqueue.go

Issue 1494223002: Add API to allow you to get the non-transactional datastore or taskqueue. (Closed) Base URL: https://github.com/luci/gae.git@master
Patch Set: fix doc and naming Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « impl/prod/raw_datastore.go ('k') | service/datastore/context.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: impl/prod/taskqueue.go
diff --git a/impl/prod/taskqueue.go b/impl/prod/taskqueue.go
index 08c3441ccfca6b4e6f8b0c46fabd75fc166e7b40..77cd201dd613820a2a7217b726c9117d505509af 100644
--- a/impl/prod/taskqueue.go
+++ b/impl/prod/taskqueue.go
@@ -17,8 +17,11 @@ import (
// useTQ adds a gae.TaskQueue implementation to context, accessible
// by gae.GetTQ(c)
func useTQ(c context.Context) context.Context {
- return tq.SetRawFactory(c, func(ci context.Context) tq.RawInterface {
- return tqImpl{AEContext(ci)}
+ return tq.SetRawFactory(c, func(ci context.Context, wantTxn bool) tq.RawInterface {
+ if wantTxn {
+ return tqImpl{AEContext(ci)}
+ }
+ return tqImpl{AEContextNoTxn(ci)}
})
}
« no previous file with comments | « impl/prod/raw_datastore.go ('k') | service/datastore/context.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698