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

Unified Diff: impl/memory/taskqueue_data.go

Issue 2302743002: Interface update, per-method Contexts. (Closed)
Patch Set: Lightning talk licenses. Created 4 years, 3 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 | « impl/memory/taskqueue.go ('k') | impl/memory/taskqueue_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: impl/memory/taskqueue_data.go
diff --git a/impl/memory/taskqueue_data.go b/impl/memory/taskqueue_data.go
index db863a6cf1ea4a4e72c2680d0057e0fe870a0475..29b1bfc77f5fda16a6a788439715a508c365c343 100644
--- a/impl/memory/taskqueue_data.go
+++ b/impl/memory/taskqueue_data.go
@@ -14,7 +14,9 @@ import (
"golang.org/x/net/context"
ds "github.com/luci/gae/service/datastore"
+ "github.com/luci/gae/service/info"
tq "github.com/luci/gae/service/taskqueue"
+
"github.com/luci/luci-go/common/clock"
)
@@ -127,7 +129,7 @@ func (t *taskQueueData) purgeLocked(queueName string) error {
return nil
}
-func (t *taskQueueData) prepTask(c context.Context, ns string, task *tq.Task, queueName string) (*tq.Task, error) {
+func (t *taskQueueData) prepTask(c context.Context, task *tq.Task, queueName string) (*tq.Task, error) {
toSched := task.Duplicate()
if toSched.Path == "" {
@@ -158,7 +160,7 @@ func (t *taskQueueData) prepTask(c context.Context, ns string, task *tq.Task, qu
}
if _, ok := toSched.Header[currentNamespace]; !ok {
- if ns != "" {
+ if ns := info.GetNamespace(c); ns != "" {
if toSched.Header == nil {
toSched.Header = http.Header{}
}
« no previous file with comments | « impl/memory/taskqueue.go ('k') | impl/memory/taskqueue_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698