fix(infra): drop duplicated restart word · openclaw/openclaw@923828c
jameswniu
·
2026-06-16
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -191,7 +191,8 @@ describe("restart sentinel", () => {
|
191 | 191 | const textA = formatRestartSentinelMessage(payloadA); |
192 | 192 | const textB = formatRestartSentinelMessage(payloadB); |
193 | 193 | expect(textA).toBe(textB); |
194 | | -expect(textA).toContain("Gateway restart restart ok"); |
| 194 | +expect(textA).toContain("Gateway restart ok"); |
| 195 | +expect(textA).not.toContain("Gateway restart restart"); |
195 | 196 | expect(textA).not.toContain('"ts"'); |
196 | 197 | }); |
197 | 198 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -235,7 +235,8 @@ export function summarizeRestartSentinel(payload: RestartSentinelPayload): strin
|
235 | 235 | const kind = payload.kind; |
236 | 236 | const status = payload.status; |
237 | 237 | const mode = payload.stats?.mode ? ` (${payload.stats.mode})` : ""; |
238 | | -return `Gateway restart ${kind} ${status}${mode}`.trim(); |
| 238 | +const kindSegment = kind === "restart" ? "" : ` ${kind}`; |
| 239 | +return `Gateway restart${kindSegment} ${status}${mode}`.trim(); |
239 | 240 | } |
240 | 241 | |
241 | 242 | export function trimLogTail(input?: string | null, maxChars = 8000) { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。