fix bug #2023 and code optimize (#2167)

* 减少等待刷新状态时间

* fix bug #2023
This commit is contained in:
rewerma
2019-09-12 08:47:22 +08:00
committed by agapple
parent 803565456f
commit 31bb85bea3
5 changed files with 79 additions and 66 deletions

View File

@@ -109,13 +109,15 @@ public class CanalInstanceServiceImpl implements CanalInstanceService {
}));
}
futures.forEach(f -> {
for (Future<Void> f :futures){
try {
f.get(3, TimeUnit.SECONDS);
} catch (TimeoutException | InterruptedException | ExecutionException e) {
} catch (InterruptedException | ExecutionException e) {
// ignore
} catch (TimeoutException e){
break;
}
});
}
return pager;
}

View File

@@ -154,13 +154,15 @@ public class NodeServerServiceImpl implements NodeServerService {
return !status;
}));
}
futures.forEach(f -> {
for (Future<Boolean> f :futures){
try {
f.get(3, TimeUnit.SECONDS);
} catch (TimeoutException | InterruptedException | ExecutionException e) {
} catch (InterruptedException | ExecutionException e) {
// ignore
} catch (TimeoutException e){
break;
}
});
}
return pager;
}