views:

137

answers:

1

I have created a new task queue and defined it in queue.yaml

I am not sure how to start adding tasks to this queue?

with the default queue it is simple taskqueue.add(...)

how do we do it for a custom queue?

+4  A: 

You may specify which queue to add a task to by passing a queue_name parameter (documentation). queue_name defaults to "default". Example:

 taskqueue.Task(url='...', params={...}).add(queue_name='my_custom_queue')
David Underhill
When i do this, i am getting an "TypeError: Invalid arguments: queue_name" error?
demos
Unfortunately, it looks like one cannot pass `queue_name` to `taskqueue.add()`, so you have to use the `Task` class to create the task and then pass `queue_name` to `Task.add()`. I have updated the example in my answer to reflect this.
David Underhill
I've also created a [feature request issue](http://code.google.com/p/googleappengine/issues/detail?id=3283) that asks `taskqueue.add()` to handle a `queue_name` parameter.
David Underhill