def google.appengine.api.labs.taskqueue.taskqueue.Queue.__init__ |
( |
|
self, |
|
|
|
name = _DEFAULT_QUEUE |
|
) |
| |
Initializer.
Args:
name: Name of this queue. If not supplied, defaults to the default queue.
Raises:
InvalidQueueNameError if the queue name is invalid.
def google.appengine.api.labs.taskqueue.taskqueue.Queue.add |
( |
|
self, |
|
|
|
task, |
|
|
|
transactional = False |
|
) |
| |
Adds a Task or list of Tasks to this Queue.
If a list of more than one Tasks is given, a raised exception does not
guarantee that no tasks were added to the queue (unless transactional is set
to True). To determine which tasks were successfully added when an exception
is raised, check the Task.was_enqueued property.
Args:
task: A Task instance or a list of Task instances that will added to the
queue.
transactional: If False adds the Task(s) to a queue irrespectively to the
enclosing transaction success or failure. An exception is raised if True
and called outside of a transaction. (optional)
Returns:
The Task or list of tasks that was supplied to this method.
Raises:
BadTaskStateError: if the Task(s) has already been added to a queue.
BadTransactionStateError: if the transactional argument is true but this
call is being made outside of the context of a transaction.
Error-subclass on application errors.
def google.appengine.api.labs.taskqueue.taskqueue.Queue.name |
( |
|
self | ) |
|
Returns the name of this queue.
def google.appengine.api.labs.taskqueue.taskqueue.Queue.purge |
( |
|
self | ) |
|
Removes all the tasks in this Queue.
This function takes constant time to purge a Queue and some delay may apply
before the call is effective.
Raises:
UnknownQueueError if the Queue does not exist on server side.
The documentation for this class was generated from the following file:
- code/googleappengine-read-only/python/google/appengine/api/labs/taskqueue/taskqueue.py