A backup whose lock is lost stops with one line, not a stack trace (closes #184)
check / check (push) Canceled after 0s
check / check (push) Canceled after 0s
proper-lockfile's default onCompromised throws from a timer, so a backup whose backup.lock was removed or taken over by another backup died with a stack trace. lockBackupDirectory now returns the lock, its release function and why it was lost, and passes a handler that only records the reason. The backup checks it after the refresh and before each original, thumbnail, file's JSON and album, and before it writes failures.json, and then fails with "lost the lock on DIR: REASON", which quak backup prints as one line, exiting 1. lib.backup() takes a caller's lock as lock, in place of lockHeld: true. Releasing a lost lock leaves backup.lock alone, since it may be another backup's. Model: opus-5-5
This commit was merged in pull request #193.
This commit is contained in:
@@ -69,6 +69,7 @@ export {
|
||||
type EnsureEvent,
|
||||
lockBackupDirectory,
|
||||
runBackup,
|
||||
type BackupLock,
|
||||
type BackupOptions,
|
||||
type BackupResult,
|
||||
type BackupError,
|
||||
|
||||
Reference in New Issue
Block a user