mirror of
https://github.com/garrytan/gbrain.git
synced 2026-07-27 22:15:33 +00:00
fix(doctor): guard nullable engine in supervisor DB-lock fallback (#2227)
Follow-up to the supervisor-visibility commit: doctor's engine binding is BrainEngine | null, so the inspectLock fallback must guard on a non-null engine (tsc TS2345). No behavior change — a null engine simply skips the DB-lock probe and falls back to the pidfile reading, as before. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
0979d1875b
commit
784e62c535
@@ -4401,7 +4401,7 @@ export async function buildChecks(
|
||||
// Consult the queue-scoped DB singleton lock (#1849, HOME-independent) before
|
||||
// warning. PID-reuse-safe (isLockHolderLive keys on lock freshness).
|
||||
let detectedViaDbLock = false;
|
||||
if (!pidfileRunning) {
|
||||
if (!pidfileRunning && engine) {
|
||||
try {
|
||||
const { inspectLock, isLockHolderLive } = await import('../core/db-lock.ts');
|
||||
const { supervisorLockId, SUPERVISOR_LOCK_TTL_MIN } = await import('../core/minions/supervisor.ts');
|
||||
|
||||
Reference in New Issue
Block a user