waigani
waigani

Reputation: 3580

GAE backend instance with deferred

I am using urlfetch via deferred.defer. I get a timeout error. I've read to use the backend instances if your tasks need more time and grunt. In the documentation on push tasks it shows you how to do this:

taskqueue.add(url='/path/to/my/worker/', params={'key': key}, target='1.backend1')

But I can find no examples of how to target a backend instance with deferred.defer.

Upvotes: 1

Views: 441

Answers (1)

someone1
someone1

Reputation: 3570

You can do this, use the _target parameter, e.g.:

deferred.defer(func, key=key, _target='1.backend1')

Upvotes: 5

Related Questions