Long running program in Google App Engine

爷,独闯天下 提交于 2019-12-01 08:29:25

You are hinting at it yourself.

If you think your job can finish within 10 minutes, you can do it with tasks queues alone.

If not, you will need to use a combination of task queues and backends. You need to push it into a backend instance. Take a look at Push queues and backends

UPDATE - with modules instead of backends

Backends are deprecated in favour of modules. A way to do it with modules is to:

  1. convert your app to modules structure
  2. define a module with manual scaling
  3. handle the "/_ah/start" url in that module
  4. execute all of your job in the "/_ah/start" handler

Manual scaling instances don't have constraints on how long time they may run. You can run "forever" in the "/_ah/start" request if the instance has manual scaling. Hey, you can even start threads, if you like. But it should not be necessary for this job. Just run until done.

This sort of thing is exactly what the MapReduce framework is for.

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