谷歌应用引擎模块 - 长时间运行的任务 > 10 分钟

rak*_*net 5 python google-app-engine

我正在尝试移植到谷歌应用引擎模块,这是一项以前长期运行的工作(在“后端”中运行)。

下面提供了一个示例 module1.yaml。

application: myuniqueapp
module:  module1
version: 1
runtime: python27
api_version: 1
threadsafe: true
instance_class: F4_1G
automatic_scaling:
  max_idle_instances: 1

handlers:
- url: /data
  static_dir: data
  application_readable: true

- url: /.*
  script: app.application
Run Code Online (Sandbox Code Playgroud)

通过任务队列提交给它的代码(从前端实例)是这样的:

taskqueue.add(url='/tasks/do_my_task',
            target='1.module1')
Run Code Online (Sandbox Code Playgroud)

这可以毫无问题地提交正确的任务。该任务也由 module1 执行。

但它在第 10 分钟被杀死,并出现 DeadlineExceededError。这是一个长时间运行的任务,运行时间超过 10 分钟(就像它过去为“后端”工作的方式一样)。

对于在模块中执行的任务 > 10 分钟,需要进行哪些配置更改?