GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Add task create & lease/acknowledge sample. by dzlier-gcp · Pull Request #1153 · GoogleCloudPlatform/java-docs-samples Conversation
Member
Still working on the appengine version, but thought I would create the pull request now so reviews can start, since we were wanting this done by EOD. I do not have a README currently because the content seems copied from the documentation at https://cloud.google.com/tasks/docs/quickstart-pull, which someone else will be working on this weekend. I will grab it from there and pull it down when it is done.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
dzlier-gcp
force-pushed
the
master
branch
6 times, most recently
from
bd33182 to
a8ea5c3
Compare
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
kurtisvg
suggested changes
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are you sure that you want the region tag to start here? It feels like most of the command line parsing isn't relevant enough that we want to link to it from elsewhere.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wasn't sure, but I also wanted to include enough context to understand what was happening. I don't know if these tags are used in the documentation, I was just copying them from the python sample. But I don't mind moving it.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It might be a good idea to add a line of logging for when the payload is null - that way if the user forgets to set a payload the endpoint will still logged that it was triggered.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These log statements were actually just for my debugging purposes initially, but yeah I can add one for a null payload. Warning level probably, since it doesn't affect the execution?
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Typically logging is debug < info < warning < critical, so using ' debug' or 'info' is probably typical (but I don't think it makes a big difference for a smaller application).
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is building the jar with dependencies required for deployment? If not, can we remove this section?
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any reason you are passing a builder instead of just the request?
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not, on line 148 it passes
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Or do you mean declaring it locally as a request instead of a builder? If I'm taking the Ack request out into a var below, I'll do the same here for consistency.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
|
| } | ||
| Task task = response.getTasksList().get(0); | ||
| System.out.println("Leased task: " + task.getName()); | ||
| client.acknowledgeTask(AcknowledgeTaskRequest |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
What do you think about building the AcknowledgeTaskRequest before the function and passing it in? I think it increases readability and makes it more obvious what the function requires.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Yeah that's fine.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Requested changes done. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
* Add task create & lease/acknowledge sample. * Add Appengine Queue Tasks sample.
* Add task create & lease/acknowledge sample. * Add Appengine Queue Tasks sample.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.