mirror of
https://gitee.com/dromara/Jpom.git
synced 2024-12-02 11:58:01 +08:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
62291ed35b
@ -198,6 +198,29 @@ public class NodeUpdateHandler extends BaseProxyHandler {
|
||||
}
|
||||
WebSocketMessageModel restartMessage = new WebSocketMessageModel("restart", id);
|
||||
client.send(restartMessage.toString());
|
||||
// 重启后尝试访问插件端,能够连接说明重启完毕
|
||||
ThreadUtil.execute(() -> {
|
||||
WebSocketMessageModel callbackRestartMessage = new WebSocketMessageModel("restart", id);
|
||||
int retryCount = 0;
|
||||
try {
|
||||
// 先等待一会,太快可能还没重启
|
||||
Thread.sleep(10000L);
|
||||
while (retryCount <= 30) {
|
||||
++retryCount;
|
||||
try {
|
||||
Thread.sleep(1000L);
|
||||
if (client.reconnectBlocking()) {
|
||||
this.sendMsg(callbackRestartMessage.setData("重启完成"), session);
|
||||
return;
|
||||
}
|
||||
} catch (Exception e) {}
|
||||
}
|
||||
this.sendMsg(callbackRestartMessage.setData("重连失败"), session);
|
||||
} catch (Exception e) {
|
||||
DefaultSystemLog.getLog().error("升级后重连插件端失败:" + model, e);
|
||||
this.sendMsg(callbackRestartMessage.setData("重连插件端失败"), session);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.sendMsg(model.setData("节点连接丢失"), session);
|
||||
}
|
||||
|
@ -27,7 +27,7 @@
|
||||
{{ text | version }}
|
||||
</template>
|
||||
<template slot="status" slot-scope="text">
|
||||
<div class="restarting" v-if="text && text.type === 'restarting'">重启中,大约需要30秒</div>
|
||||
<div class="restarting" v-if="text && text.type === 'restarting'">{{ text.data }}</div>
|
||||
<div class="uploading" v-if="text && text.type === 'uploading'">
|
||||
<div class="text">{{ text.percent === 100 ? "上传成功" : "正在上传文件" }}</div>
|
||||
<a-progress :percent="text.percent" />
|
||||
@ -225,6 +225,7 @@ export default {
|
||||
this.nodeStatus = Object.assign({}, this.nodeStatus, {
|
||||
[nodeId]: {
|
||||
type: "restarting",
|
||||
data: data,
|
||||
},
|
||||
});
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user