From 1336be3d1a2342b71698792eb4a93e32af13f066 Mon Sep 17 00:00:00 2001 From: Lawrence L Date: Mon, 12 Jun 2017 14:03:38 -0700 Subject: [PATCH] Region tags for documentation (#696) --- .../java/com/example/appengine/taskqueue/push/Enqueue.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/appengine/taskqueue-push/src/main/java/com/example/appengine/taskqueue/push/Enqueue.java b/appengine/taskqueue-push/src/main/java/com/example/appengine/taskqueue/push/Enqueue.java index e0fbeaac062..806e3a911a1 100644 --- a/appengine/taskqueue-push/src/main/java/com/example/appengine/taskqueue/push/Enqueue.java +++ b/appengine/taskqueue-push/src/main/java/com/example/appengine/taskqueue/push/Enqueue.java @@ -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; @@ -33,9 +35,11 @@ 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("/"); } }