0
votes

I added sample pull queue and added deferred task to pull queue through servlet.

I added another servlet (Lease Servlet) to lease task, which leases 1 task for 5 minutes and just prints how many tasks it leased.

Now I checked by sending request to Lease Servlet within expired time (i.e., 5mins) which I am getting 0 tasks leased which is fine.

But if I lease task after 5 minutes, I am getting 0 tasks leased and got deleted from pull queue.

Is this expected behaviour? I thought the task will return back to pull queue and available.

Please help me.

1
How long after are you checking? From what I've seen there can be up to 1 minute delay after adding (or lease time runs out) before it can be leased. - Ryan
I checked after 15 minutes from leased task added back to pull queue after expiry time. - Naresh M
Sorry it is my mistake, I specified retry limit as 1 for the pull queue - Naresh M

1 Answers

1
votes

It is due to retry parameter set to 1 in queue.xml for the pull queue.