Skip to content

Commit

Permalink
Add NotFoundException to retry condition for Google Batch
Browse files Browse the repository at this point in the history
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
  • Loading branch information
pditommaso committed Nov 1, 2024
1 parent 8bad0b4 commit aa4d19c
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import java.util.function.Predicate

import com.google.api.gax.core.CredentialsProvider
import com.google.api.gax.rpc.FixedHeaderProvider
import com.google.api.gax.rpc.NotFoundException
import com.google.api.gax.rpc.UnavailableException
import com.google.auth.Credentials
import com.google.cloud.batch.v1.BatchServiceClient
Expand Down Expand Up @@ -178,6 +179,8 @@ class BatchClient {
return true
if( t instanceof TimeoutException || t.cause instanceof TimeoutException )
return true
if( t instanceof NotFoundException || t.cause instanceof NotFoundException )
return true
return false
}
}
Expand Down

0 comments on commit aa4d19c

Please sign in to comment.