Skip to content

Commit

Permalink
adds more messages when retries occur
Browse files Browse the repository at this point in the history
  • Loading branch information
bmckinney committed Nov 10, 2016
1 parent 74f58c4 commit f2fde2e
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1150,11 +1150,11 @@ static String getFileChecksum(String file, String format) {

/**
* Poll the import job, pending completion
* @param jobId
* @param apiToken
* @param retry
* @param sleep
* @return json
* @param jobId job execution id
* @param apiToken user token
* @param retry max number of retry attempts
* @param sleep milliseconds to wait between attempts
* @return json job status
*/
public static String pollJobStatus(String jobId, String apiToken, int retry, long sleep) {
int maxTries = 0;
Expand All @@ -1170,8 +1170,10 @@ public static String pollJobStatus(String jobId, String apiToken, int retry, lon
.get(props.getProperty("job.status.api") + jobId);
json = jobResponse.body().asString();
status = JsonPath.from(json).getString("status");
System.out.println("JOB STATUS: " + status);
System.out.println("JOB STATUS RETRY ATTEMPT: " + Integer.toString(retry));
} else {
System.out.println("JOB STATUS ERROR: Failed to get job status after " + Integer.toString(retry)
+ " attempts.");
break;
}
}
Expand All @@ -1181,7 +1183,7 @@ public static String pollJobStatus(String jobId, String apiToken, int retry, lon
}
return json;
}

/**
* Kick off a job with default mode (MERGE)
* @return a job execution entity
Expand Down

0 comments on commit f2fde2e

Please sign in to comment.