build(desktop): 升级 electron-shell 版本至 1.6.3 并调整插件执行超时配置

- 插件执行超时默认延长至 6 小时,支持插件单独配置超时时间
- 新增插件根目录迁移逻辑,解决旧版权限问题
- 新增多个服务端实体、DTO、配置模块等基础代码
- 新增插件 UI 模板及相关静态资源
This commit is contained in:
2026-10-15 11:38:45 +08:00
parent 3dcedf95fd
commit f27639777f
717 changed files with 88647 additions and 17543 deletions
+12 -2
View File
@@ -417,8 +417,18 @@ function watchRun(scheduleId, runId) {
persist();
};
HUB.on("event", onEvent);
// 兜底:进程异常或事件丢失时不让监听器长期驻留(执行超时上限 + 2 分钟宽限)
timer = setTimeout(() => HUB.removeListener("event", onEvent), (config.RUN_TIMEOUT + 120) * 1000);
// 兜底:进程异常或事件丢失时不让监听器长期驻留(按该任务插件的执行超时上限 + 2 分钟宽限;
// 插件声明不限时时给 7 天硬上限,避免 setTimeout 溢出提前移除监听)
let boundSecs = config.RUN_TIMEOUT;
const sched = _schedules.find((x) => x.id === scheduleId);
if (sched && sched.plugin_id) {
try {
const plugin = require("./registry").find(sched.plugin_id);
const t = config.runTimeoutFor(plugin);
boundSecs = t > 0 ? t : 7 * 24 * 3600;
} catch (e) { /* 插件缺失/解析失败:沿用壳默认 */ }
}
timer = setTimeout(() => HUB.removeListener("event", onEvent), (boundSecs + 120) * 1000);
if (timer.unref) timer.unref();
}