mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-21 10:16:44 +00:00
fix(ci): await async doctor compaction in the sqlite reliability runner
runDoctorStateSqliteCompact became async in #106210 but this caller still read fields off the Promise, breaking check-test-types and the bench-sqlite-reliability tooling test on main.
This commit is contained in:
@@ -348,9 +348,12 @@ function assertCompactionProof(proof: {
|
||||
};
|
||||
}
|
||||
|
||||
function compactTargetDatabase(target: TargetDatabase, env: NodeJS.ProcessEnv): CompactionProof {
|
||||
async function compactTargetDatabase(
|
||||
target: TargetDatabase,
|
||||
env: NodeJS.ProcessEnv,
|
||||
): Promise<CompactionProof> {
|
||||
if (target.identity.role === "global") {
|
||||
const report = runDoctorStateSqliteCompact({ env });
|
||||
const report = await runDoctorStateSqliteCompact({ env });
|
||||
if (report.skipped) {
|
||||
throw new Error(`global compaction unexpectedly skipped ${target.path}`);
|
||||
}
|
||||
@@ -406,7 +409,7 @@ async function runMaintenanceRoundTrip(params: {
|
||||
rowsPerBatch: params.rowsPerBatch,
|
||||
uncommittedBatch: null,
|
||||
});
|
||||
const compaction = compactTargetDatabase(params.target, params.env);
|
||||
const compaction = await compactTargetDatabase(params.target, params.env);
|
||||
verifyRestoredDatabase({
|
||||
expectedState,
|
||||
identity: params.target.identity,
|
||||
|
||||
Reference in New Issue
Block a user