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 que开发者_开发知识库ue it is simple taskqueue.add(...)
how do we do it for a custom queue?
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')
this works for me:
final Queue queue = QueueFactory.getQueue("queuename);
queue.add(TaskOptions.Builder.withUrl("/path/to/queue"); //as defined in web.xml
精彩评论