Django GAE tasks improves upon App Engine's Deferred library and is forked from FreshPlanet's project.
This is forked from FreshPlanet’s improved App Engine Deferred module. and has the added functionality of having a Django View along with the webapp2 handler so that it can be used in either project type.
The AppEngine Python SDK has a great module when it comes to easily run some code “later”: the deferred library (if you are unfamiliar with this library, please have a look at its documentation first).
However the library has a few drawbacks that we solve here:
We also added a couple of features to it:
And some helpers: - is_from_task_queue(): Check if we are currently running from a task queue - get_retry_count(): Returns the current number of times the current task is being retried - log_as_retried(): Depending on # of times the task is being retried, we will increase the logging level.
Our module still makes use of the deferred exceptions types `SingularTaskFailure` and `PermanentTaskFailure` to be compatible with existing code.
INSTALLED_APPS = ( 'gae_tasks' )
urlpatterns = [ url(r'^', include('gae_tasks.urls')), ]
GAE_TASKS_DISABLE: False GAE_TASKS_WARMUP_MODULE: None GAE_TASKS_DEFAULT_QUEUES: ['default'] GAE_TASKS_BACKGROUND_MODULE: None
(See the tasks module for more details)