Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add region tags #1012

Merged
merged 3 commits into from
Jan 30, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 {
}
}

}
}