Skip to content

Add Cloud Tasks snippets #1537

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

Merged
merged 10 commits into from
Aug 6, 2019
Merged

Add Cloud Tasks snippets #1537

merged 10 commits into from
Aug 6, 2019

Conversation

averikitsch
Copy link
Contributor

No description provided.

@averikitsch averikitsch requested a review from a team August 6, 2019 03:45
@kurtisvg kurtisvg self-assigned this Aug 6, 2019
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Aug 6, 2019
@@ -0,0 +1,314 @@
/*
* Copyright 2018 Google LLC
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Copyright 2018 Google LLC
* Copyright 2019 Google LLC

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

// [END taskqueues_retrying_tasks]

// Run sample: mvn clean package exec:java -Dexec.mainClass="com.example.appengine.Snippets"
public static void main(String[] args) throws Exception {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

import java.nio.charset.Charset;

public class Snippets {
// [START taskqueues_using_yaml]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should these follow the new format and be in different files?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

Copy link
Contributor

@kurtisvg kurtisvg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have a few region tags that don't follow the guidelines from the previous sample - if they aren't in use it would be nice to remove them (or update if they are still being used).

queue.add(TaskOptions.Builder.withUrl("/worker").param("key", key));
// [END addQueue]
try (CloudTasksClient client = CloudTasksClient.create()) {
String projectId = "starter-akitsch";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😲

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?! I have no idea how that file got added to this PR?!

@averikitsch averikitsch merged commit b407ebf into master Aug 6, 2019
@averikitsch averikitsch deleted the taskqueues branch August 6, 2019 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants