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

Side by Side Diff: service/taskqueue/taskqueue.go

Issue 1890983004: service/taskqueue: Add NewPOSTTask, remove NewTask (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/gae@master
Patch Set: Created 4 years, 8 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 // found in the LICENSE file.
4 4
5 package taskqueue 5 package taskqueue
6 6
7 import ( 7 import (
8 "github.com/luci/luci-go/common/errors" 8 "github.com/luci/luci-go/common/errors"
9 ) 9 )
10 10
11 type taskqueueImpl struct{ RawInterface } 11 type taskqueueImpl struct{ RawInterface }
12 12
13 func (t *taskqueueImpl) NewTask(path string) *Task {
14 return &Task{Path: path}
15 }
16
17 func (t *taskqueueImpl) Add(task *Task, queueName string) error { 13 func (t *taskqueueImpl) Add(task *Task, queueName string) error {
18 return errors.SingleError(t.AddMulti([]*Task{task}, queueName)) 14 return errors.SingleError(t.AddMulti([]*Task{task}, queueName))
19 } 15 }
20 16
21 func (t *taskqueueImpl) Delete(task *Task, queueName string) error { 17 func (t *taskqueueImpl) Delete(task *Task, queueName string) error {
22 return errors.SingleError(t.DeleteMulti([]*Task{task}, queueName)) 18 return errors.SingleError(t.DeleteMulti([]*Task{task}, queueName))
23 } 19 }
24 20
25 func (t *taskqueueImpl) AddMulti(tasks []*Task, queueName string) error { 21 func (t *taskqueueImpl) AddMulti(tasks []*Task, queueName string) error {
26 lme := errors.NewLazyMultiError(len(tasks)) 22 lme := errors.NewLazyMultiError(len(tasks))
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 68
73 func (t *taskqueueImpl) Raw() RawInterface { 69 func (t *taskqueueImpl) Raw() RawInterface {
74 return t.RawInterface 70 return t.RawInterface
75 } 71 }
76 72
77 func (t *taskqueueImpl) Testable() Testable { 73 func (t *taskqueueImpl) Testable() Testable {
78 return t.RawInterface.Testable() 74 return t.RawInterface.Testable()
79 } 75 }
80 76
81 var _ Interface = (*taskqueueImpl)(nil) 77 var _ Interface = (*taskqueueImpl)(nil)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698