I am trying to have some task in a push queue to be executed at rate of about once a second.
Here is how I defined my queue.yaml
queue:
- name: default
rate: 1/s
bucket_size: 1
max_concurrent_requests: 1
I have a handler (for /tasks/readalerts
), that enqueues the task:
t := taskqueue.NewPOSTTask("/tasks/readalerts", map[string][]string{})
if _, err := taskqueue.Add(context, t, ""); err != nil {
context.Errorf("%v", err)
}
Once I visit the /tasks/readalerts
the task is indeed being enqueued but it seems like it is running once in about 60ms (this is happening on dev machine, didn't try to deploy it).
What am I missing? shouldn't there be at least 1 second between each task execution?
Thanks, Itay