Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GAE: Know if a specific task is on the queue

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 :)

like image 541
Jeremax Avatar asked Dec 06 '25 10:12

Jeremax


1 Answers

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.

like image 67
Stuart Langley Avatar answered Dec 08 '25 00:12

Stuart Langley



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!