Reputation: 39909
When configuring my tasks following the guide of Google App Engine, I read that it was possible to have some tasks runs for more than 10 minutes (the default limit) and go to one hour, by using a manual or basic scaling module.
I tried to configure it this way (with the following yaml configurations) but my tasks are always killed after 10 minutes, not 1 hour.
What I am doing wrong?
queue.yaml :
queue:
- name: long_process
max_concurrent_requests: 10
rate: 1/s
... (other tasks)
long_process_queue_module.yaml:
module: long-process-queue-module
runtime: python27
api_version: 1
version: 1
threadsafe: true
instance_class: B1
manual_scaling:
instances: 5
handlers:
- url: /_ah/queue/myhandler
script: wsgi.application
login: admin
What is wrong ? How can I set the duration to 1 hour?
In case it's important, I'd also like to be able to run this tasks more than one at once. I currently set instances: 5
suspecting it would run 5 long-process concurrently, but maybe I'm wrong here too?
Upvotes: 1
Views: 377
Reputation: 2618
You need to define the task to be run in the long-process-queue-module
, you can specify the target field in the queue.yaml, or when you enqueue a task. https://cloud.google.com/appengine/docs/python/config/queue#target
https://cloud.google.com/appengine/docs/python/taskqueue/tasks#task_target
Upvotes: 3