refactor(tasks): drop duplicate maintenance stop alias · openclaw/openclaw@29e44f5
vincentkoc
·
2026-06-19
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -88,7 +88,7 @@ async function withTaskCommandStateDir(
|
88 | 88 | await withOpenClawTestState( |
89 | 89 | { layout: "state-only", prefix: "openclaw-tasks-command-" }, |
90 | 90 | async (state) => { |
91 | | -taskRegistryMaintenance.stopTaskRegistryMaintenanceForTests(); |
| 91 | +taskRegistryMaintenance.stopTaskRegistryMaintenance(); |
92 | 92 | taskRegistryMaintenance.resetTaskRegistryMaintenanceRuntimeForTests(); |
93 | 93 | resetConfigRuntimeState(); |
94 | 94 | resetDetachedTaskLifecycleRuntimeForTests(); |
@@ -99,7 +99,7 @@ async function withTaskCommandStateDir(
|
99 | 99 | try { |
100 | 100 | await run(state); |
101 | 101 | } finally { |
102 | | -taskRegistryMaintenance.stopTaskRegistryMaintenanceForTests(); |
| 102 | +taskRegistryMaintenance.stopTaskRegistryMaintenance(); |
103 | 103 | taskRegistryMaintenance.resetTaskRegistryMaintenanceRuntimeForTests(); |
104 | 104 | resetConfigRuntimeState(); |
105 | 105 | resetDetachedTaskLifecycleRuntimeForTests(); |
@@ -119,7 +119,7 @@ describe("tasks commands", () => {
|
119 | 119 | |
120 | 120 | afterEach(() => { |
121 | 121 | vi.useRealTimers(); |
122 | | -taskRegistryMaintenance.stopTaskRegistryMaintenanceForTests(); |
| 122 | +taskRegistryMaintenance.stopTaskRegistryMaintenance(); |
123 | 123 | taskRegistryMaintenance.resetTaskRegistryMaintenanceRuntimeForTests(); |
124 | 124 | resetConfigRuntimeState(); |
125 | 125 | resetDetachedTaskLifecycleRuntimeForTests(); |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -18,7 +18,7 @@ import {
|
18 | 18 | resetTaskRegistryMaintenanceRuntimeForTests, |
19 | 19 | runTaskRegistryMaintenance, |
20 | 20 | setTaskRegistryMaintenanceRuntimeForTests, |
21 | | -stopTaskRegistryMaintenanceForTests, |
| 21 | +stopTaskRegistryMaintenance, |
22 | 22 | } from "./task-registry.maintenance.js"; |
23 | 23 | import type { TaskRecord } from "./task-registry.types.js"; |
24 | 24 | |
@@ -48,7 +48,7 @@ type TaskRegistryMaintenanceRuntime = Parameters<
|
48 | 48 | >[0]; |
49 | 49 | |
50 | 50 | afterEach(() => { |
51 | | -stopTaskRegistryMaintenanceForTests(); |
| 51 | +stopTaskRegistryMaintenance(); |
52 | 52 | resetTaskRegistryMaintenanceRuntimeForTests(); |
53 | 53 | resetDetachedTaskLifecycleRuntimeForTests(); |
54 | 54 | }); |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1230,8 +1230,6 @@ export function stopTaskRegistryMaintenance() {
|
1230 | 1230 | sweepInProgress = false; |
1231 | 1231 | } |
1232 | 1232 | |
1233 | | -export const stopTaskRegistryMaintenanceForTests = stopTaskRegistryMaintenance; |
1234 | | - |
1235 | 1233 | export function setTaskRegistryMaintenanceRuntimeForTests( |
1236 | 1234 | runtime: TaskRegistryMaintenanceRuntime, |
1237 | 1235 | ): void { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -67,7 +67,7 @@ import {
|
67 | 67 | runTaskRegistryMaintenance, |
68 | 68 | setTaskRegistryMaintenanceRuntimeForTests, |
69 | 69 | startTaskRegistryMaintenance, |
70 | | -stopTaskRegistryMaintenanceForTests, |
| 70 | +stopTaskRegistryMaintenance, |
71 | 71 | sweepTaskRegistry, |
72 | 72 | } from "./task-registry.maintenance.js"; |
73 | 73 | import { configureTaskRegistryRuntime } from "./task-registry.store.js"; |
@@ -2924,7 +2924,7 @@ describe("task-registry", () => {
|
2924 | 2924 | }); |
2925 | 2925 | |
2926 | 2926 | startTaskRegistryMaintenance(); |
2927 | | -stopTaskRegistryMaintenanceForTests(); |
| 2927 | +stopTaskRegistryMaintenance(); |
2928 | 2928 | |
2929 | 2929 | await vi.advanceTimersByTimeAsync(5_000); |
2930 | 2930 | await flushAsyncWork(); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。