I am trying to run simple function and limit retry using deffered lib. This is the simple use of deferred.defer(Simple_function, para1, para2, _countdown=30). If this function fails the process is retrying above 30 sec.
Asked
Active
Viewed 524 times
0
-
The [manual for task queues](https://cloud.google.com/appengine/docs/python/taskqueue/) and the [api doc for deferred](https://cloud.google.com/appengine/docs/python/refdocs/google.appengine.ext.deferred.deferred) are a good place to start. – Josh J Oct 08 '15 at 14:47
2 Answers
1
The countdown only applies to the first execution of the task. Retry behaviour is controlled from the config in your queue.yaml, as per here.

Greg
- 10,350
- 1
- 26
- 35
-
-
you may need to use the "Task Queue API" for that level of control. – Paul Collingwood Oct 08 '15 at 08:12
-
Yes but if you do not want create handler for every simple function you run in queue. So for that matter deferred library is best match. – ZApatel Oct 08 '15 at 11:06
-
1deferred tasks run on the `default` queue by default. You can manage queue retry behavior like @Greg mentioned in his answer. If you want it to execute in a custom task queue, pass the queue name to `defer` with the `_queue` argument. You can research more by [reading the documentation of the library you are using](https://cloud.google.com/appengine/docs/python/refdocs/google.appengine.ext.deferred.deferred) since this information is already available in the manual. – Josh J Oct 08 '15 at 14:45
0
The _countdown
parameter in deferred.defer()
refers to the delay of the execution of your task, in your case 30 seconds. It doesn't apply to the retry mechanism if your task resulted in an error or timeout.

Nikunj Pandya
- 186
- 1
- 6