提交 ecf7edd0 编写于 作者: O o2null

Merge branch 'cherry-pick-6243b5d9' into 'wrdp'

扩大timeout

See merge request o2oa/o2oa!5589
......@@ -63,7 +63,7 @@ public class RegistApplicationsEvent implements Event {
req.setValue(gson.toJson(list));
for (Entry<String, CenterServer> entry : Config.nodes().centerServers().orderedEntry()) {
CipherConnectionAction.put(false, 1000, 2000,
CipherConnectionAction.put(false, 4000, 8000,
Config.url_x_program_center_jaxrs(entry, "center", "regist", "applications"), req);
}
......@@ -124,7 +124,7 @@ public class RegistApplicationsEvent implements Event {
private CompletableFuture<Long> healthCheckTask(Application application) {
return CompletableFuture.supplyAsync(() -> {
try {
Resp resp = CipherConnectionAction.get(false, 1000, 1000, application, "echo").getData(Resp.class);
Resp resp = CipherConnectionAction.get(false, 2000, 4000, application, "echo").getData(Resp.class);
Date date = resp.getServerTime();
return Math.abs(date.getTime() - ((new Date()).getTime()));
} catch (Exception e) {
......
......@@ -24,7 +24,7 @@ public class UpdateApplicationsEvent implements Event {
public void execute(Server applicationServer) {
try {
if ((null != applicationServer) && applicationServer.isStarted()) {
ActionResponse respone = CipherConnectionAction.get(false, 1000, 2000,
ActionResponse respone = CipherConnectionAction.get(false, 4000, 8000,
Config.url_x_program_center_jaxrs("center", "applications"));
Applications applications = respone.getData(Applications.class);
Config.resource_node_applications(XGsonBuilder.instance().toJsonTree(applications));
......
......@@ -29,7 +29,7 @@ public class VoteCenterEvent implements Event {
List<Entry<String, CenterServer>> list = listCenterServer();
for (Entry<String, CenterServer> entry : list) {
try {
ActionResponse response = CipherConnectionAction.get(false, 1000, 2000,
ActionResponse response = CipherConnectionAction.get(false, 4000, 8000,
Config.url_x_program_center_jaxrs(entry, "echo"));
JsonElement jsonElement = response.getData(JsonElement.class);
if (null != jsonElement && (!jsonElement.isJsonNull())) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册