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

Unified Diff: go/src/infra/gae/libs/wrapper/taskqueue.go

Issue 1230303003: Revert "Refactor current GAE abstraction library to be free of the SDK*" (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Created 5 years, 5 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
Index: go/src/infra/gae/libs/wrapper/taskqueue.go
diff --git a/go/src/infra/gae/libs/gae/taskqueue.go b/go/src/infra/gae/libs/wrapper/taskqueue.go
similarity index 77%
rename from go/src/infra/gae/libs/gae/taskqueue.go
rename to go/src/infra/gae/libs/wrapper/taskqueue.go
index aa4de3d9d72fc18858977d341b5f3382faf7a206..7bda49a2ab1ea8f623bce50326ccc7454d628c7b 100644
--- a/go/src/infra/gae/libs/gae/taskqueue.go
+++ b/go/src/infra/gae/libs/wrapper/taskqueue.go
@@ -2,17 +2,19 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-package gae
+package wrapper
import (
"golang.org/x/net/context"
+
+ "appengine/taskqueue"
)
// TQSingleReadWriter allows you to add or delete a single Task from a queue.
// See appengine.taskqueue.
type TQSingleReadWriter interface {
- Add(task *TQTask, queueName string) (*TQTask, error)
- Delete(task *TQTask, queueName string) error
+ Add(task *taskqueue.Task, queueName string) (*taskqueue.Task, error)
+ Delete(task *taskqueue.Task, queueName string) error
}
// TQMultiReadWriter allows you to add or delete a batch of Tasks from a queue.
@@ -20,16 +22,16 @@ type TQSingleReadWriter interface {
type TQMultiReadWriter interface {
TQSingleReadWriter
- AddMulti(tasks []*TQTask, queueName string) ([]*TQTask, error)
- DeleteMulti(tasks []*TQTask, queueName string) error
+ AddMulti(tasks []*taskqueue.Task, queueName string) ([]*taskqueue.Task, error)
+ DeleteMulti(tasks []*taskqueue.Task, queueName string) error
}
// TQLeaser allows you to lease tasks from a Pull queue.
// See appengine.taskqueue.
type TQLeaser interface {
- Lease(maxTasks int, queueName string, leaseTime int) ([]*TQTask, error)
- LeaseByTag(maxTasks int, queueName string, leaseTime int, tag string) ([]*TQTask, error)
- ModifyLease(task *TQTask, queueName string, leaseTime int) error
+ Lease(maxTasks int, queueName string, leaseTime int) ([]*taskqueue.Task, error)
+ LeaseByTag(maxTasks int, queueName string, leaseTime int, tag string) ([]*taskqueue.Task, error)
+ ModifyLease(task *taskqueue.Task, queueName string, leaseTime int) error
}
// TQPurger allows you to drain a queue without processing it. See
@@ -41,7 +43,7 @@ type TQPurger interface {
// TQStatter allows you to obtain semi-realtime stats on the current state of
// a queue. See appengine.taskqueue.
type TQStatter interface {
- QueueStats(queueNames []string) ([]TQStatistics, error)
+ QueueStats(queueNames []string, maxTasks int) ([]taskqueue.QueueStatistics, error)
}
// TaskQueue is the full interface to the Task Queue service.
@@ -49,7 +51,6 @@ type TaskQueue interface {
TQMultiReadWriter
TQLeaser
TQPurger
- TQStatter
}
// TQFactory is the function signature for factory methods compatible with
« no previous file with comments | « go/src/infra/gae/libs/wrapper/memory/testing_utils_test.go ('k') | go/src/infra/gae/libs/wrapper/taskqueue_testable.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698