Skip to content

Commit

Permalink
Remove job block, add sleep back
Browse files Browse the repository at this point in the history
  • Loading branch information
benmoriceau committed Oct 11, 2023
1 parent 006094d commit 3399030
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@ private SerializedAirbyteMessageConsumer getStandardRecordConsumer(final BigQuer
},
(hasFailed) -> {
try {
Thread.sleep(30 * 1000);
typerDeduper.typeAndDedupe();
typerDeduper.commitFinalTables();
typerDeduper.cleanup();
Expand Down
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 (!JobStatus.State.DONE.equals(job.getStatus())) {
Thread.sleep(1000L);
job = job.reload();
}
} */
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 3399030

Please sign in to comment.