GoogleCloudPlatform/getting-started-java

Bug: Incorrect path to worker in task sample code

DrifterAtSea opened this issue · 1 comments

In the sample code located at:

https://github.com/GoogleCloudPlatform/java-docs-samples/blob/master/appengine-java8/taskqueues-push/src/main/java/com/example/appengine/taskqueue/push/Enqueue.java

line 47. The code shows:

queue.add(TaskOptions.Builder.withUrl("/worker").param("key", key));

The path is incorrect. It should be "/taskqueues/worker":

queue.add(TaskOptions.Builder.withUrl("/taskqueues/worker").param("key", key));

Without this path corrected, the doPost at will not get called in the worker handler:

https://github.com/GoogleCloudPlatform/java-docs-samples/blob/master/appengine-java8/taskqueues-push/src/main/java/com/example/appengine/taskqueue/push/Worker.java

This bug should be filed in the java-docs-samples repo, but I've opened GoogleCloudPlatform/java-docs-samples#2444 to fix it.