feat(worker): IO Worker 分道(WK-1)
io worker 进程内按任务声明的 lane 分文件 / 网络 / 维护三条道,各自并发(缺省 2/4/1)、 各自排队;维护道在文件道或网络道有排队/运行时让路(连续 10 分钟放行一个),调度器内联的 清理/回填/保留期裁剪也走维护道。并发在 设置 → 自动化 → 高级 热生效,env 覆盖;旧 WORKER_CONCURRENCY 映射到网络道。运行状态页按道显示运行中/并发/排队。归属表写进 docs/runbook/dev.md,ci 与注册表逐项核对。 Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
68f53390f6
commit
da33cad81d
38 files changed
+1240
-105
No files matched your search
@@ -1,5 +1,5 @@
|
||||
import { useQueryClient } from "@tanstack/react-query";
|
||||
import type { HealthLevel, SystemHealth, SystemProcess } from "@umt/contracts";
|
||||
import type { HealthLevel, SystemHealth, SystemProcess, SystemWorkerLane } from "@umt/contracts";
|
||||
import {
|
||||
AlertTriangle,
|
||||
ChevronDown,
|
||||
@@ -226,6 +226,8 @@ function Processes({ d }: { d: SystemHealth }) {
|
||||
cell: (p) =>
|
||||
p.concurrency.io === undefined && p.concurrency.agent === undefined ? (
|
||||
<span className="text-muted-foreground">—</span>
|
||||
) : p.lanes.length ? (
|
||||
<LaneCell p={p} />
|
||||
) : (
|
||||
<span className="whitespace-nowrap tabular-nums">
|
||||
io {p.concurrency.io ?? 0} · 智能体 {p.concurrency.agent ?? 0}
|
||||
@@ -261,6 +263,30 @@ function Processes({ d }: { d: SystemHealth }) {
|
||||
);
|
||||
}
|
||||
|
||||
const LANE_LABEL: Record<SystemWorkerLane["lane"], string> = { file: "文件", network: "网络", maintenance: "维护" };
|
||||
|
||||
/** io worker 分道(WK-1):每道一行「运行中/并发 · 排队」,维护道让路时标出来 */
|
||||
function LaneCell({ p }: { p: SystemProcess }) {
|
||||
return (
|
||||
<div className="grid justify-items-end gap-0.5 text-meta">
|
||||
{p.lanes.map((l) => (
|
||||
<span
|
||||
key={l.lane}
|
||||
className="whitespace-nowrap tabular-nums"
|
||||
title={l.source === "env" ? "并发由环境变量指定,设置页的值不生效" : undefined}
|
||||
>
|
||||
{LANE_LABEL[l.lane]} {l.running}/{l.concurrency}
|
||||
{l.queued ? ` · 排队 ${l.queued}` : ""}
|
||||
{l.yielding ? " · 让路中" : ""}
|
||||
</span>
|
||||
))}
|
||||
{p.concurrency.agent !== undefined ? (
|
||||
<span className="whitespace-nowrap tabular-nums text-muted-foreground">智能体 {p.concurrency.agent}</span>
|
||||
) : null}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
/** 已下线实例:已退出、容器已重建或被同容器新进程替换的旧心跳行,默认折叠,不参与告警 */
|
||||
function RetiredProcesses({ rows }: { rows: SystemProcess[] }) {
|
||||
const [open, setOpen] = useState(false);
|
||||
|
||||
Reference in new issue
Block a user