![]() |
App Engine Python SDK
v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
|
Classes | |
class | _QueueDetails |
Public Member Functions | |
def | __init__ |
def | GetQueues |
def | GetTasks |
def | DeleteTask |
def | FlushQueue |
def | GetDummyTaskStore |
![]() | |
def | __init__ |
def | CreateRPC |
def | MakeSyncCall |
def | SetError |
Public Attributes | |
rfile | |
wfile | |
wfile_close | |
![]() | |
request_data | |
Static Public Attributes | |
queue_yaml_parser = _ParseQueueYaml | |
![]() | |
THREADSAFE = False | |
Python only task queue service stub. This stub executes tasks when enabled by using the dev_appserver's AddEvent capability. When task running is disabled this stub will store tasks for display on a console, where the user may manually execute the tasks.
def google.appengine.api.labs.taskqueue.taskqueue_stub.TaskQueueServiceStub.__init__ | ( | self, | |
service_name = 'taskqueue' , |
|||
root_path = None , |
|||
auto_task_running = False , |
|||
task_retry_seconds = 30 , |
|||
_all_queues_valid = False |
|||
) |
Constructor. Args: service_name: Service name expected for all calls. root_path: Root path to the directory of the application which may contain a queue.yaml file. If None, then it's assumed no queue.yaml file is available. auto_task_running: When True, the dev_appserver should automatically run tasks after they are enqueued. task_retry_seconds: How long to wait between task executions after a task fails.
def google.appengine.api.labs.taskqueue.taskqueue_stub.TaskQueueServiceStub.DeleteTask | ( | self, | |
queue_name, | |||
task_name | |||
) |
Deletes a task from a queue. Args: queue_name: the name of the queue to delete the task from. task_name: the name of the task to delete.
def google.appengine.api.labs.taskqueue.taskqueue_stub.TaskQueueServiceStub.FlushQueue | ( | self, | |
queue_name | |||
) |
Removes all tasks from a queue. Args: queue_name: the name of the queue to remove tasks from.
def google.appengine.api.labs.taskqueue.taskqueue_stub.TaskQueueServiceStub.GetDummyTaskStore | ( | self, | |
app_id, | |||
queue_name | |||
) |
Get the dummy task store for this app_id/queue_name pair. Creates an entry and populates it, if there's not already an entry. Args: app_id: the app_id. queue_name: the queue_name. Returns: the existing or the new dummy store.
def google.appengine.api.labs.taskqueue.taskqueue_stub.TaskQueueServiceStub.GetQueues | ( | self | ) |
Gets all the applications's queues. Returns: A list of dictionaries, where each dictionary contains one queue's attributes. E.g.: [{'name': 'some-queue', 'max_rate': '1/s', 'bucket_size': 5, 'oldest_task': '2009/02/02 05:37:42', 'eta_delta': '0:00:06.342511 ago', 'tasks_in_queue': 12}, ...] The list of queues always includes the default queue.
def google.appengine.api.labs.taskqueue.taskqueue_stub.TaskQueueServiceStub.GetTasks | ( | self, | |
queue_name | |||
) |
Gets a queue's tasks. Args: queue_name: Queue's name to return tasks for. 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-TaskRetryCount': '0'), ('X-AppEngine-Development-Payload': '1'), ('Content-Length': 0), ('Content-Type': 'application/octet-stream')] Raises: ValueError: A task request contains an unknown HTTP method type.