Skip to content

Commit

Permalink
fix waiting for job to be done
Browse files Browse the repository at this point in the history
  • Loading branch information
benmoriceau committed Oct 12, 2023
1 parent bd4b9f2 commit f9059ab
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ public void close(boolean hasFailed) throws IOException {
this.writeChannel.close();
try {
Job job = writeChannel.getJob();
/* while (!JobStatus.State.DONE.equals(job.getStatus())) {
while (job == null) {
Thread.sleep(1000L);
job = job.reload();
} */
job = writeChannel.getJob();
}
if (job.getStatus().getError() != null) {
throw new RuntimeException("Fail to complete a load job in big query, Job id: " + writeChannel.getJob().getJobId() +
", with error: " + writeChannel.getJob().getStatus().getError());
Expand Down

0 comments on commit f9059ab

Please sign in to comment.