Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Passing multiple parameter in app-engine Task Queue (JAVA)

Is there a way to pass multiple parameters in a Queue in google-app-engine? I use the code below

Queue queue = QueueFactory.getQueue("sms-queue");
queue.add(TaskOptions.Builder.url("/SQ").param("id",pId));

in my servlet this id is retrievd as a query string.

long pID = Long.parseLong(req.getParameter("id"));      

I need to pass 6 parameters.

like image 902
Manjoor Avatar asked Jun 24 '10 06:06

Manjoor


1 Answers

Have you tried doing this:

queue.add(TaskOptions.Builder
    .url("/SQ")
    .param("p1Name", p1Value)
    .param("p2Name", p2Value)
    .param("p3Name", p3Value)
    // etc
);
like image 51
Lauri Lehtinen Avatar answered Sep 28 '22 17:09

Lauri Lehtinen