Stop setting such a low task_retry_limit
. Also, make sure that in your app.yaml you have threadsafe: true
so your tasks can run concurrently without needing additional instances to be started.
Taskqueue run only 1 task from the queue
-
01-06-2022 - |
Question
Im using google appengine taskqueue to run one of my api in the background. this api takes about 3 seconds to run, but I add it to the queue several time like that:
while len(lst) > 0:
logging.info("calling my_api")
taskqueue.add(url='/my_api', params={ 'param_a': lst.pop(0) },
retry_options= TaskRetryOptions(task_retry_limit=1) )
when len(lst) is 2 the taskqueue perform only one call to '/my_api'(I see in the log 2 entries of "calling my_api"). im using the most basic backend (B1). any ideas?
thanks.
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow