-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Add Cloud Tasks snippets #1537
Conversation
@@ -0,0 +1,314 @@ | |||
/* | |||
* Copyright 2018 Google LLC |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Copyright 2018 Google LLC | |
* Copyright 2019 Google LLC |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove this?
There was a problem hiding this comment.
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] |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
There was a problem hiding this 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"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😲
There was a problem hiding this comment.
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?!
No description provided.