A class that encapsulates a sorted store of tasks.
Used for testing the admin console.
def google.appengine.api.labs.taskqueue.taskqueue_stub._DummyTaskStore.__init__ |
( |
|
self | ) |
|
def google.appengine.api.labs.taskqueue.taskqueue_stub._DummyTaskStore.Add |
( |
|
self, |
|
|
|
request |
|
) |
| |
Inserts a new task into the store.
Args:
request: A taskqueue_service_pb.TaskQueueAddRequest.
Raises:
apiproxy_errors.ApplicationError: If a task with the same name is already
in the store.
def google.appengine.api.labs.taskqueue.taskqueue_stub._DummyTaskStore.Count |
( |
|
self | ) |
|
Returns the number of tasks in the store.
def google.appengine.api.labs.taskqueue.taskqueue_stub._DummyTaskStore.Delete |
( |
|
self, |
|
|
|
name |
|
) |
| |
Deletes a task from the store by name.
Args:
name: the name of the task to delete.
Returns:
TaskQueueServiceError.UNKNOWN_TASK: if the task is unknown.
TaskQueueServiceError.INTERNAL_ERROR: if the store is corrupted.
TaskQueueServiceError.OK: otherwise.
def google.appengine.api.labs.taskqueue.taskqueue_stub._DummyTaskStore.Lookup |
( |
|
self, |
|
|
|
maximum, |
|
|
|
name = None , |
|
|
|
eta = None |
|
) |
| |
Lookup a number of sorted tasks from the store.
If 'eta' is specified, the tasks are looked up in a list sorted by 'eta',
then 'name'. Otherwise they are sorted by 'name'. We need to be able to
sort by 'eta' and 'name' because tasks can have identical eta. If you had
20 tasks with the same ETA, you wouldn't be able to page past them, since
the 'next eta' would give the first one again. Names are unique, though.
Args:
maximum: the maximum number of tasks to return.
name: a task name to start with.
eta: an eta to start with.
Returns:
A list of up to 'maximum' tasks.
Raises:
ValueError: if the task store gets corrupted.
def google.appengine.api.labs.taskqueue.taskqueue_stub._DummyTaskStore.Oldest |
( |
|
self | ) |
|
Returns the oldest eta in the store, or None if no tasks.
def google.appengine.api.labs.taskqueue.taskqueue_stub._DummyTaskStore.Populate |
( |
|
self, |
|
|
|
num_tasks |
|
) |
| |
Populates the store with a number of tasks.
Args:
num_tasks: the number of tasks to insert.
The documentation for this class was generated from the following file:
- code/googleappengine-read-only/python/google/appengine/api/labs/taskqueue/taskqueue_stub.py