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

Unified Diff: impl/memory/taskqueue.go

Issue 2512093002: Add support for Pull Queues to prod implementation. (Closed)
Patch Set: use time.Duration for leaseTime Created 4 years, 1 month 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/dummy/dummy.go ('k') | impl/prod/taskqueue.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: impl/memory/taskqueue.go
diff --git a/impl/memory/taskqueue.go b/impl/memory/taskqueue.go
index 99b029a2feba65b9905bfe5fcfc2b36e73da39d6..840c5b8b877ade6f863565b7cb6c58aec2f4b0c9 100644
--- a/impl/memory/taskqueue.go
+++ b/impl/memory/taskqueue.go
@@ -6,6 +6,7 @@ package memory
import (
"regexp"
+ "time"
"golang.org/x/net/context"
@@ -105,6 +106,18 @@ func (t *taskqueueImpl) DeleteMulti(tasks []*tq.Task, queueName string, cb tq.Ra
return nil
}
+func (t *taskqueueImpl) Lease(maxTasks int, queueName string, leaseTime time.Duration) ([]*tq.Task, error) {
+ panic("not implemented yet")
+}
+
+func (t *taskqueueImpl) LeaseByTag(maxTasks int, queueName string, leaseTime time.Duration, tag string) ([]*tq.Task, error) {
+ panic("not implemented yet")
+}
+
+func (t *taskqueueImpl) ModifyLease(task *tq.Task, queueName string, leaseTime time.Duration) error {
+ panic("not implemented yet")
+}
+
func (t *taskqueueImpl) Purge(queueName string) error {
t.Lock()
defer t.Unlock()
@@ -208,6 +221,18 @@ func (t *taskqueueTxnImpl) DeleteMulti([]*tq.Task, string, tq.RawCB) error {
return errors.New("taskqueue: cannot DeleteMulti from a transaction")
}
+func (t *taskqueueTxnImpl) Lease(maxTasks int, queueName string, leaseTime time.Duration) ([]*tq.Task, error) {
+ return nil, errors.New("taskqueue: cannot Lease from a transaction")
+}
+
+func (t *taskqueueTxnImpl) LeaseByTag(maxTasks int, queueName string, leaseTime time.Duration, tag string) ([]*tq.Task, error) {
+ return nil, errors.New("taskqueue: cannot LeaseByTag from a transaction")
+}
+
+func (t *taskqueueTxnImpl) ModifyLease(task *tq.Task, queueName string, leaseTime time.Duration) error {
+ return errors.New("taskqueue: cannot ModifyLease from a transaction")
+}
+
func (t *taskqueueTxnImpl) Purge(string) error {
return errors.New("taskqueue: cannot Purge from a transaction")
}
« no previous file with comments | « impl/dummy/dummy.go ('k') | impl/prod/taskqueue.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698