Reputation: 2396
I'm having difficulty understanding some aspects of Google AppEngine Push Task Queue for java, namely, when a task is executed, where does the response go?
If I add something to the queue like this:
Queue queue = QueueFactory.getDefaultQueue();
queue.add(withUrl("/worker").param("key", key));
Then sometime later the task is executed, with something like this:
public class SomeServlet extends HttpServlet {
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
...
resp.getWriter().println("something"); //-- where does this response go???
}
}
Sorry for the newbie question, but where does this response go? My app didn't set up a normal http request so it's not waiting for a normal http response. I must be missing something fundamental about the task queue.
Upvotes: 0
Views: 1522
Reputation: 2459
The response doesn't go anywhere. In a task you would typically write to the datastore, add new tasks to task queue, send xmpp, call external URLs.
If the response code is 200 OK, the task is removed from the queue, if it's an error code, it is retried (depending on retry settings).
Upvotes: 5
Reputation: 6617
There is no document indicated where GAE stored these responses. I would not surprise GAE just don't care the response after it trigger the request url successfully.
By the way, I don't see a point to care about the response. If you want to log what happen during the task execution, you should use Log instead. https://developers.google.com/appengine/docs/java/runtime#Logging
Upvotes: 0