![]() |
App Engine Python SDK
v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
|
Public Member Functions | |
def | __init__ |
def | initialize |
def | post |
def | handle |
def | task_retry_count |
def | retry_task |
![]() | |
def | initialize |
def | get |
def | post |
def | head |
def | options |
def | put |
def | delete |
def | trace |
def | error |
def | redirect |
def | handle_exception |
def | new_factory |
def | get_url |
Additional Inherited Members | |
![]() | |
request | |
response | |
Base class for handlers intended to be run only from the task queue. Sub-classes should implement 1. the 'handle' method for all POST request. 2. '_preprocess' method for decoding or validations before handle. 3. '_drop_gracefully' method if _preprocess fails and the task has to be dropped. In Python27 runtime, webapp2 will automatically replace webapp.
def google.appengine.ext.mapreduce.base_handler.TaskQueueHandler.handle | ( | self | ) |
To be implemented by subclasses.
def google.appengine.ext.mapreduce.base_handler.TaskQueueHandler.initialize | ( | self, | |
request, | |||
response | |||
) |
Initialize. 1. call webapp init. 2. check request is indeed from taskqueue. 3. check the task has not been retried too many times. 4. run handler specific processing logic. 5. run error handling logic if precessing failed. Args: request: a webapp.Request instance. response: a webapp.Response instance.
def google.appengine.ext.mapreduce.base_handler.TaskQueueHandler.retry_task | ( | self | ) |
Ask taskqueue to retry this task. Even though raising an exception can cause a task retry, it will flood logs with highly visible ERROR logs. Handlers should uses this method to perform controlled task retries. Only raise exceptions for those deserve ERROR log entries.
def google.appengine.ext.mapreduce.base_handler.TaskQueueHandler.task_retry_count | ( | self | ) |
Number of times this task has been retried.