Reputation: 1016
I know the question has been asked before but I have not been able to find a definite answer.
I would like to use a dynamic backend to process tasks added to the default push queue. I would prefer to use a backend since I need the extra memory (1g vs 128m)
The questions How do dynamic backends start in Google App Engine and Starting and stopping Google App Engine backends both suggest that this cannot be done programatically while the documentation and GAE issue 5695 both suggests it can be done.
If yes - how? (The behavior I would like is that the dynamic backend starts when a task is added to the queue and stops when the queue is empty.)
Upvotes: 1
Views: 344
Reputation: 12838
Resident backends have to be started and stopped manually. Dynamic backends start automatically when they receive an HTTP request, and shut down after a few minutes of idle time.
To address a task to a particular backend, specify a target:
taskqueue.add(url='/path/to/my/worker/', params={'key': key},
target='1.backend1')
Upvotes: 4