Skip to content

Commit

Permalink
Add region tags (#1012)
Browse files Browse the repository at this point in the history
* Add region tags

One for create task and one for lease and acknowledge task

* Update PullQueue.java

Updated comment markers

* Update PullQueue.java

Changed indents on comments
  • Loading branch information
ellenevans authored and dpebot committed Jan 30, 2018
1 parent 3784ac3 commit 49bd0aa
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ private static CloudTasks createAuthorizedClient() throws IOException {
.build();
}

// [START cloud_tasks_create_task]
/**
* Create a task for a given queue with a given payload.
*/
Expand Down Expand Up @@ -96,7 +97,10 @@ private static Task createTask(
System.out.println(String.format("Created task %s",task.getName()));
return result;
}

// [END cloud_tasks_create_task]


// [START cloud_tasks_lease_and_acknowledge_task]
/**
* Pull a single task from a given queue and lease it for 10 minutes.
*/
Expand Down Expand Up @@ -144,6 +148,7 @@ private static void acknowledgeTask(Task task) throws IOException {
.execute();
System.out.println(String.format("Acknowledged task %s", task.getName()));
}
// [END cloud_tasks_lease_and_acknowledge_task]

public static void main(String[] args) throws Exception {
ArgumentParser parser = ArgumentParsers.newFor("PullQueue").build()
Expand Down Expand Up @@ -206,4 +211,4 @@ public static void main(String[] args) throws Exception {
}
}

}
}

0 comments on commit 49bd0aa

Please sign in to comment.