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

Unified Diff: impl/prod/context.go

Issue 1630833002: Add UseBackground. (Closed) Base URL: https://github.com/luci/gae.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: impl/prod/context.go
diff --git a/impl/prod/context.go b/impl/prod/context.go
index 8a613253d2aa4cd85cc42a80895cc36ee07d1da8..007d006fb2a3ca736f9a762b2a26f7228590907f 100644
--- a/impl/prod/context.go
+++ b/impl/prod/context.go
@@ -86,6 +86,12 @@ func Use(c context.Context, r *http.Request) context.Context {
return setupAECtx(c, appengine.NewContext(r))
}
+// UseBackground is the same as Use except that it activates production
+// implementations which aren't associated with any particular request.
Vadim Sh. 2016/01/25 18:56:17 What are conditions of it working? Can you please
+func UseBackground(c context.Context) context.Context {
+ return setupAECtx(c, appengine.BackgroundContext())
+}
+
// UseRemote is the same as Use, except that it lets you attach a context to
// a remote host using the Remote API feature. See the docs for the
// prerequisites.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698