Skip to content

Commit

Permalink
avoid printing contention error
Browse files Browse the repository at this point in the history
  • Loading branch information
Ajay Kannan committed Oct 13, 2015
1 parent 33ddb90 commit cf46337
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ public class LocalGcdHelper {
private static final String GCLOUD = "gcloud";
private static final Path INSTALLED_GCD_PATH;
private static final String GCD_VERSION_PREFIX = "gcd-emulator ";
private static final String CONTENTION_ERROR_MESSAGE =
"com.google.apphosting.client.serviceapp.RpcException: " +
"too much contention on these datastore entities. please try again.";

static {
INSTALLED_GCD_PATH = installedGcdPath();
Expand Down Expand Up @@ -223,8 +226,11 @@ public void run() {
if (errorOutput == null) {
errorReaderDone = true;
} else {
if (errorOutput.startsWith("SEVERE")) {
System.err.println(errorOutput);
if (errorOutput.startsWith("INFO:")
|| errorOutput.startsWith("com.google.apphosting.client.serviceapp")) {
if (!errorOutput.startsWith(CONTENTION_ERROR_MESSAGE)) {
System.err.println(errorOutput);
}
}
}
}
Expand Down

0 comments on commit cf46337

Please sign in to comment.