Reputation: 73
I am using pull queues and I lease tasks from the queues in one of my backends .
The problem is that after leasing the tasks , the task dont execute on there on , I suppose I need to iterate the list List and execute each of my task
I dont know how to execute or call run method using TaskHandle reference I get
Please help me in same
Upvotes: 0
Views: 147
Reputation: 73
But we managed to execute tasks , we just had to deserialize them in traditional java way into proper class and it worked , thanks :)
ObjectInputStream ois = new ObjectInputStream(
new ByteArrayInputStream(taskHandle.getPayload()));
QueueTask d;
d = (QueueTask) ois.readObject();
Just that is it :-)
Upvotes: 0
Reputation: 31928
Task in the pull queue don't "execute", you suppose to lease them (pull them) and use them in the context that you pulled them from (in your case the backend).
After finishing with the task you need to delete them.
Upvotes: 1