mirror of https://github.com/openclaw/openclaw.git
fix(tasks): close registry stores on test resets
This commit is contained in:
parent
6f91f87f3b
commit
d4f69878da
|
|
@ -710,6 +710,6 @@ export function resetTaskFlowRegistryForTests(opts?: { persist?: boolean }) {
|
|||
resetTaskFlowRegistryRuntimeForTests();
|
||||
if (opts?.persist !== false) {
|
||||
persistFlowRegistry();
|
||||
getTaskFlowRegistryStore().close?.();
|
||||
}
|
||||
getTaskFlowRegistryStore().close?.();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1927,10 +1927,10 @@ export function resetTaskRegistryForTests(opts?: { persist?: boolean }) {
|
|||
listenerStarted = false;
|
||||
if (opts?.persist !== false) {
|
||||
persistTaskRegistry();
|
||||
// Close the sqlite handle after persisting the empty snapshot so Windows temp-dir
|
||||
// cleanup can remove the state directory without hitting runs.sqlite EBUSY errors.
|
||||
getTaskRegistryStore().close?.();
|
||||
}
|
||||
// Always close the sqlite handle so Windows temp-dir cleanup can remove the
|
||||
// state directory even when a test intentionally skips persisting the reset.
|
||||
getTaskRegistryStore().close?.();
|
||||
}
|
||||
|
||||
export function resetTaskRegistryDeliveryRuntimeForTests() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue