fix: harden doctor config cleanup

This commit is contained in:
Peter Steinberger
2026-01-20 01:43:59 +00:00
parent 8e33bd8610
commit d4df747f9f
3 changed files with 28 additions and 11 deletions

View File

@@ -1795,7 +1795,9 @@ export class MemoryIndexManager {
if (!this.batch.enabled) {
return { disabled: true, count: this.batchFailureCount };
}
const increment = params.forceDisable ? BATCH_FAILURE_LIMIT : Math.max(1, params.attempts ?? 1);
const increment = params.forceDisable
? BATCH_FAILURE_LIMIT
: Math.max(1, params.attempts ?? 1);
this.batchFailureCount += increment;
this.batchFailureLastError = params.message;
this.batchFailureLastProvider = params.provider;