Checking status of Task Queue in Google App Engine

試著忘記壹切 提交于 2020-01-01 04:46:04

问题


I'm putting several tasks into a task queue and would like to know when the specific tasks are done. I haven't found anything in the API about call backs, or checking the status of a task, so I thought I'd see what other people do, or if there's a work around (or official) way to check. I don't care about individual tasks, if it helps, I'm putting 6 different tasks in, and want to know when all 6 are complete.

Thanks!


回答1:


The new REST/JSON task queue API will let you do this.

http://code.google.com/appengine/docs/python/taskqueue/rest.html

This does not scale well to thousands of tasks...

I do like the pipeline API suggestion though!




回答2:


You might be able to accomplish this with the pipeline api. You make something dependent on all 6 tasks and let it rip.

http://code.google.com/p/appengine-pipeline/

Good Luck.




回答3:


You can use memcache. Use a unique key specific to this task group. Set a count when you kick off your tasks, and have each task atomically decrement it. When the value is 0, your tasks are complete. The task that finds this value to be 0 can call your callback.



来源:https://stackoverflow.com/questions/6500878/checking-status-of-task-queue-in-google-app-engine

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!