Custom task queue in App Engine?

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

I'm not sure how to start adding tasks to this queue?

with the default queue, it's just taskqueue.add (...)

How to do this for a user queue?

+4
source share
2 answers

You can specify which queue to add the task to by passing the queue_name parameter ( documentation ). queue_name by default the default value is used. Example:

  taskqueue.Task(url='...', params={...}).add(queue_name='my_custom_queue') 
+10
source

this works for me:

 final Queue queue = QueueFactory.getQueue("queuename); queue.add(TaskOptions.Builder.withUrl("/path/to/queue"); //as defined in web.xml 
0
source

Source: https://habr.com/ru/post/1311355/


All Articles