Reputation: 41
I have to know if a specific task, specific by parameters on the url, is on the queue or not ... should it's possible ?
I'm using Java !
Thanks :)
Upvotes: 3
Views: 372
Reputation: 7054
You can probably do this using Named Tasks.
For example, you could hash the task parameters and set the result as the name. Then if you try and insert a task with the same parameters twice the second insertion would fail.
As mentioned before there are race conditions here, you might want to consider if there is a design where having more than once copy of the same task in the queue at any one time is not going to cause problems.
Upvotes: 1
Reputation: 4407
You can use TASK Queue REST API for your checking status of tasks in queue
https://developers.google.com/appengine/docs/java/taskqueue/rest#method_taskqueue_tasks_list
Alternatively you can code for it in advance, use com.google.appengine.api.taskqueue.TaskHandle class to get an handle on the task, and then expose the object through a API
Upvotes: 0