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
Readme Update #14
Readme Update #14
Conversation
Updating the client code to break when the transfer is completed and adding "start agent" part
README.md
Outdated
@@ -73,6 +74,9 @@ public class SampleClient { | |||
try { | |||
TransferStateApiResponse transferState = client.getTransferState(TransferStateApiRequest.newBuilder().setTransferId(transferApiResponse.getTransferId()).build()); | |||
System.out.println("Latest Transfer State " + transferState.getState()); | |||
if (transferState.getState().equals("COMPLETED")) { |
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.
if ("COMPLETED".equals(transferState.getState()) || "FAILED".equals(transferState.getState()))) {
This is to avoid NPEs
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.
Shouldn't it retry if FAILED
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 wanted to ask should it come out if it fails?. I am sure I can do that too. Since it was the sample program just added that line to close the program gracefully.
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.
If the API says it failed, it was failed after retry. So you don't have anything more to do in this transfer. You are good to quit after Failed message
README.md
Outdated
@@ -73,6 +74,9 @@ public class SampleClient { | |||
try { | |||
TransferStateApiResponse transferState = client.getTransferState(TransferStateApiRequest.newBuilder().setTransferId(transferApiResponse.getTransferId()).build()); | |||
System.out.println("Latest Transfer State " + transferState.getState()); | |||
if (transferState.getState().equals("COMPLETED")) { |
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.
If the API says it failed, it was failed after retry. So you don't have anything more to do in this transfer. You are good to quit after Failed message
Done I have committed the changes! |
Updating the client code to break when the transfer is completed and adding "start agent" part