fix: self-heal by clearing lock files after lock-related failures
This commit is contained in:
parent
65bfb9f9d7
commit
65f135e1a3
@ -133,6 +133,12 @@ async function runSync(): Promise<void> {
|
|||||||
state.lastSyncOk = false;
|
state.lastSyncOk = false;
|
||||||
state.errorCount++;
|
state.errorCount++;
|
||||||
logger.warn(`[workspace-sync] Periodic sync failed: ${result.error}`);
|
logger.warn(`[workspace-sync] Periodic sync failed: ${result.error}`);
|
||||||
|
|
||||||
|
// Self-heal: if failed due to lock file, clear it for next attempt
|
||||||
|
if (result.error?.includes("lock file found") || result.error?.includes(".lck")) {
|
||||||
|
logger.info("[workspace-sync] Clearing lock file for next sync attempt");
|
||||||
|
clearStaleLocks(logger);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
state.lastSyncOk = false;
|
state.lastSyncOk = false;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user