google app engine modules - long running tasks > 1

2019-04-10 00:01发布

I am trying to port to google app engine modules, a previously long-running job ( running in 'backends' ) .

A sample module1.yaml is present below.

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

The code to submit to this (from a front-end instance), via taskqueue is this:

taskqueue.add(url='/tasks/do_my_task',
            target='1.module1')

This submits the right task without an issue. The task gets executed by the module1 as well.

But it gets killed by the 10th minute, with the DeadlineExceededError. This is a long running task and runs for longer than 10 minutes ( like how it used to work for 'backends' ).

What configuration change needs to be done, for the task executing in a module to be > 10 minutes ?

1条回答
我只想做你的唯一
2楼-- · 2019-04-10 00:39

You simply need to choose manual or basic scaling for your module:

https://developers.google.com/appengine/docs/java/modules/#Java_Instance_scaling_and_class

查看更多
登录 后发表回答