Reputation: 16563
I want to set up a push queue with max_concurrent_requests
set to 1. So I created a queue.yaml
like this:
queue:
- name: myqueue
max_concurrent_requests: 1
When running in the dev server, I get the error:
root: WARNING: Refill rate must be specified for push-based queue. Please check queue.yaml file.
Doing a Google search for "refill rate" and queue.yaml doesn't give any relevant hits except for the taskqueue stub, which doesn't help me.
Changing queue.yaml
to this:
queue:
- name: myqueue
max_concurrent_requests: 1
rate: 10/s
Gets rid of the error in the dev server. Can anyone confirm that this will actually create a queue with a max of 1 concurrent request? (ok, that it is also limited to 10 per second) I'm suspicious because the queue.yaml
documentation doesn't address this.
Upvotes: 1
Views: 409
Reputation: 16563
Although not specified in the documentation, you must specify a "rate" when creating a queue. To achieve 1 maximum concurrent request, you can simply set a high rate, and the rate will essentially be ignored. My tasks take about 0.25 seconds (i.e., 4/s) so a rate of 10/s makes sure that the rate does not impact task execution.
Upvotes: 2