Skip to content

Commit

Permalink
Region tags for documentation (#695)
Browse files Browse the repository at this point in the history
  • Loading branch information
llatif authored and lesv committed Jun 9, 2017
1 parent 32b0b70 commit 55cef94
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@
*/
package com.example.appengine.taskqueue.push;

// [START import]
import com.google.appengine.api.taskqueue.Queue;
import com.google.appengine.api.taskqueue.QueueFactory;
import com.google.appengine.api.taskqueue.TaskOptions;
// [END import]

import java.io.IOException;

Expand All @@ -37,8 +39,10 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response)
String key = request.getParameter("key");

// Add the task to the default queue.
// [START addQueue]
Queue queue = QueueFactory.getDefaultQueue();
queue.add(TaskOptions.Builder.withUrl("/worker").param("key", key));
// [END addQueue]

response.sendRedirect("/");
}
Expand Down

0 comments on commit 55cef94

Please sign in to comment.