google app engine task queue sample

2019-08-04 06:44发布

问题:

Currently, i try to working with task queue. But i don't see any complete sample on this matter.

So please give me some sample of task queue in google app engine, written in python.

回答1:

import:

from google.appengine.api import taskqueue

define and run:

taskqueue.add(url='/service', params={'user': user}, method="GET")

url is the RequestHandler that leads to the code to run in the queue

params can be regular url params



回答2:

The example in Google's documentation is simple but complete. http://code.google.com/appengine/docs/python/taskqueue/overview.html