|
| queue_name |
|
| bucket_refill_per_second |
|
| bucket_capacity |
|
| user_specified_rate |
|
| retry_parameters |
|
| max_concurrent_requests |
|
| paused |
|
| queue_mode |
|
| acl |
|
| target |
|
| task_name_archive |
|
A Taskqueue Queue.
This class contains all of the properties of a queue and a sorted list of
tasks.
def google.appengine.api.taskqueue.taskqueue_stub._Queue.Add |
( |
|
self, |
|
|
|
request, |
|
|
|
now |
|
) |
| |
Inserts a new task into the store.
Args:
request: A taskqueue_service_pb.TaskQueueAddRequest.
now: A datetime.datetime object containing the current time in UTC.
Raises:
apiproxy_errors.ApplicationError: If a task with the same name is already
in the store, or the task is tombstoned.
def google.appengine.api.taskqueue.taskqueue_stub._Queue.Count |
( |
|
self | ) |
|
Returns the number of tasks in the store.
def google.appengine.api.taskqueue.taskqueue_stub._Queue.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.TOMBSTONED: if the task was deleted.
TaskQueueServiceError.OK: otherwise.
def google.appengine.api.taskqueue.taskqueue_stub._Queue.Delete_Rpc |
( |
|
self, |
|
|
|
request, |
|
|
|
response |
|
) |
| |
Implementation of the Delete RPC.
Deletes tasks from the task store. We mimic a 1/20 chance of a
TRANSIENT_ERROR when the request has an app_id.
Args:
request: A taskqueue_service_pb.TaskQueueDeleteRequest.
response: A taskqueue_service_pb.TaskQueueDeleteResponse.
def google.appengine.api.taskqueue.taskqueue_stub._Queue.FetchQueues_Rpc |
( |
|
self, |
|
|
|
request, |
|
|
|
response |
|
) |
| |
Fills out a queue message on the provided TaskQueueFetchQueuesResponse.
Args:
request: A taskqueue_service_pb.TaskQueueFetchQueuesRequest.
response: A taskqueue_service_pb.TaskQueueFetchQueuesResponse.
def google.appengine.api.taskqueue.taskqueue_stub._Queue.FetchTask_Rpc |
( |
|
self, |
|
|
|
request, |
|
|
|
response |
|
) |
| |
Implementation of the FetchTask RPC.
Args:
request: A taskqueue_service_pb.TaskQueueFetchTaskRequest.
response: A taskqueue_service_pb.TaskQueueFetchTaskResponse.
def google.appengine.api.taskqueue.taskqueue_stub._Queue.GetTaskAsDict |
( |
|
self, |
|
|
|
task_name |
|
) |
| |
Gets a specific task from this queue.
Returns:
A dictionary containing one task's attributes. E.g.
[{'name': 'task-123',
'queue_name': 'default',
'url': '/update',
'method': 'GET',
'eta': '2009/02/02 05:37:42',
'eta_delta': '0:00:06.342511 ago',
'body': '',
'headers': [('user-header', 'some-value')
('X-AppEngine-QueueName': 'update-queue'),
('X-AppEngine-TaskName': 'task-123'),
('X-AppEngine-TaskExecutionCount': '1'),
('X-AppEngine-TaskRetryCount': '1'),
('X-AppEngine-TaskETA': '1234567890.123456'),
('X-AppEngine-Development-Payload': '1'),
('X-AppEngine-TaskPreviousResponse': '300'),
('Content-Length': 0),
('Content-Type': 'application/octet-stream')]
Raises:
ValueError: A task request contains an unknown HTTP method type.
def google.appengine.api.taskqueue.taskqueue_stub._Queue.GetTasksAsDicts |
( |
|
self | ) |
|
Gets all of the tasks in this queue.
Returns:
A list of dictionaries, where each dictionary contains one task's
attributes. E.g.
[{'name': 'task-123',
'queue_name': 'default',
'url': '/update',
'method': 'GET',
'eta': '2009/02/02 05:37:42',
'eta_delta': '0:00:06.342511 ago',
'body': '',
'headers': [('user-header', 'some-value')
('X-AppEngine-QueueName': 'update-queue'),
('X-AppEngine-TaskName': 'task-123'),
('X-AppEngine-TaskExecutionCount': '1'),
('X-AppEngine-TaskRetryCount': '1'),
('X-AppEngine-TaskETA': '1234567890.123456'),
('X-AppEngine-Development-Payload': '1'),
('X-AppEngine-TaskPreviousResponse': '300'),
('Content-Length': 0),
('Content-Type': 'application/octet-stream')]
Raises:
ValueError: A task request contains an unknown HTTP method type.
def google.appengine.api.taskqueue.taskqueue_stub._Queue.IncRetryCount |
( |
|
self, |
|
|
|
task_name |
|
) |
| |
Increment the retry count of a task by 1.
Args:
task_name: The name of the task to update.
def google.appengine.api.taskqueue.taskqueue_stub._Queue.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.taskqueue.taskqueue_stub._Queue.ModifyTaskLease_Rpc |
( |
|
self, |
|
|
|
request, |
|
|
|
response |
|
) |
| |
Implementation of the ModifyTaskLease RPC.
Args:
request: A taskqueue_service_pb.TaskQueueQueryAndOwnTasksRequest.
response: A taskqueue_service_pb.TaskQueueQueryAndOwnTasksResponse.
def google.appengine.api.taskqueue.taskqueue_stub._Queue.Oldest |
( |
|
self | ) |
|
Returns the oldest eta in the store, or None if no tasks.
def google.appengine.api.taskqueue.taskqueue_stub._Queue.OldestTask |
( |
|
self | ) |
|
Returns the task with the oldest eta in the store.
def google.appengine.api.taskqueue.taskqueue_stub._Queue.Populate |
( |
|
self, |
|
|
|
num_tasks |
|
) |
| |
Populates the store with a number of tasks.
Args:
num_tasks: the number of tasks to insert.
def google.appengine.api.taskqueue.taskqueue_stub._Queue.PostponeTask |
( |
|
self, |
|
|
|
task, |
|
|
|
new_eta_usec |
|
) |
| |
Postpone the task to a future time and increment the retry count.
Args:
task: The TaskQueueQueryTasksResponse_Task to postpone. This must be
stored in this queue (otherwise an AssertionError is raised).
new_eta_usec: The new eta to set on the task. This must be greater then
the current eta on the task.
def google.appengine.api.taskqueue.taskqueue_stub._Queue.PurgeQueue |
( |
|
self | ) |
|
Removes all content from the queue.
def google.appengine.api.taskqueue.taskqueue_stub._Queue.QueryAndOwnTasks_Rpc |
( |
|
self, |
|
|
|
request, |
|
|
|
response |
|
) |
| |
Implementation of the QueryAndOwnTasks RPC.
Args:
request: A taskqueue_service_pb.TaskQueueQueryAndOwnTasksRequest.
response: A taskqueue_service_pb.TaskQueueQueryAndOwnTasksResponse.
def google.appengine.api.taskqueue.taskqueue_stub._Queue.QueryTasks_Rpc |
( |
|
self, |
|
|
|
request, |
|
|
|
response |
|
) |
| |
Implementation of the QueryTasks RPC.
Args:
request: A taskqueue_service_pb.TaskQueueQueryTasksRequest.
response: A taskqueue_service_pb.TaskQueueQueryTasksResponse.
def google.appengine.api.taskqueue.taskqueue_stub._Queue.RunTaskNow |
( |
|
self, |
|
|
|
task |
|
) |
| |
Change the eta of a task to now.
Args:
task: The TaskQueueQueryTasksResponse_Task run now. This must be
stored in this queue (otherwise an AssertionError is raised).
def google.appengine.api.taskqueue.taskqueue_stub._Queue.UpdateQueue_Rpc |
( |
|
self, |
|
|
|
request, |
|
|
|
response |
|
) |
| |
Implementation of the UpdateQueue RPC.
Args:
request: A taskqueue_service_pb.TaskQueueUpdateQueueRequest.
response: A taskqueue_service_pb.TaskQueueUpdateQueueResponse.
def google.appengine.api.taskqueue.taskqueue_stub._Queue.VerifyIndexes |
( |
|
self | ) |
|
Ensures that all three indexes are in a valid state.
This method is used by internal tests and should not need to be called in
any other circumstances.
Raises:
AssertionError: if the indexes are not in a valid state.
The documentation for this class was generated from the following file:
- code/googleappengine-read-only/python/google/appengine/api/taskqueue/taskqueue_stub.py