Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Task scheduling in AppEngine dev_appserver.py

I have a [python] AppEngine app which creates multiple tasks and adds them to a custom task queue. dev_appserver.py seems to ignore the rate/scheduling parameters I specify in queue.yaml and executes all the tasks immediately. This is a problem [as least for dev/testing purposes] as my tasks call a rate-throttled url; immediate execution of all tasks breaches the throttling limits and returns me a bunch of errors.

Does anyone know if task scheduling if dev_appserver.py is disabled ? I can't find anything that suggests this in the AppEngine docs. Can anyone suggest a workaround ?

Thank you.

like image 897
Justin Avatar asked Feb 13 '11 11:02

Justin


2 Answers

When your app is running in the development server, tasks are automatically executed at the appropriate time just as in production.
You can examine and manipulate tasks from the developer console: http://localhost:8080/_ah/admin/taskqueue

Documentation here

like image 125
systempuntoout Avatar answered Sep 23 '22 12:09

systempuntoout


The documentation lies: the development server doesn't appear to support rate limiting. (This is documented for the Java dev server, but not for Python). You can demonstrate this by pausing a queue by giving it a 0/s rate, but you'll find it executes tasks anyway. When such an app is uploaded to production, it behaves as expected.

I opened a defect.

like image 20
Tim Dierks Avatar answered Sep 25 '22 12:09

Tim Dierks