modify "countdownMillis" of a task

34 views
Skip to first unread message

Trez Ertzzer

unread,
Dec 23, 2015, 7:05:28 PM12/23/15
to Google App Engine
Hello. I work in java only.
I have a task that I add to a queue like this.
public void myFunctionThatAddTaskToTaskQueue(){

 Queue queue = QueueFactory.getQueue("findOwner");

 TaskHandle taskHandle = queue.add(TaskOptions.Builder.withPayload(new FindOwnerToAcceptRental2.FindOwnerToAcceptRentalTask(idOfFindOwner4RentalEntity)).countdownMillis(countdownMillis));

}


lets say for exemple that countdownMillis equals to 10 minutes.


let's say that something happens let's say 1 minute after the  "myFunctionThatAddTaskToTaskQueue" is called and so NOW I would like the task (the task that is already in the queue) to be handled not in 9 minutes but in 2 minutes. is it possible? if yes can you tell me how...

   

Adam (Cloud Platform Support)

unread,
Dec 23, 2015, 9:50:19 PM12/23/15
to Google App Engine
There isn't a way to modify the countdownMillis of a task already added, but what you could do is just delete the task using the taskHandle (see Queue.deleteTask(TaskHandle) and then re-add it with a different countdownMillis.

Also, this seems like a question that would be better posted to Stack Overflow, rather than a discussion post. The google-appengine group is intended more for general discussion rather than 1-on-1 support assistance. Please see the main Community Support page for a list of the tags we monitor.
Reply all
Reply to author
Forward
0 new messages