Skip to content

Commit

Permalink
fix issues 1983 (#1984)
Browse files Browse the repository at this point in the history
Co-authored-by: hexiufeng <xiufeng.he-a0968@aqara.com>
  • Loading branch information
andystenhe and hexiufeng authored May 23, 2023
1 parent ce2c3da commit 1aec0c8
Showing 1 changed file with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.concurrent.ExecutionException;

import cn.hutool.core.util.StrUtil;

/**
* KubernetesApplicationGateway
Expand Down Expand Up @@ -84,7 +87,19 @@ public GatewayResult submitJar() {
while (jobStatusMessages.size() == 0 && counts > 0) {
Thread.sleep(1000);
counts--;
jobStatusMessages = clusterClient.listJobs().get();
try {
jobStatusMessages = clusterClient.listJobs().get();
} catch (ExecutionException e) {
if (StrUtil.contains(e.getMessage(), "Number of retries has been exhausted.")) {
// refresh the job manager ip address
clusterClient.close();
clusterClient = clusterClientProvider.getClusterClient();
} else {
LogUtil.getError(e);
throw e;
}
}

if (jobStatusMessages.size() > 0) {
break;
}
Expand Down

0 comments on commit 1aec0c8

Please sign in to comment.