Watch
0
0
Fork
You've already forked hyperhive
0

archive: read the repository without its lock for the prune metrics

This commit is contained in:
atlas 2026-11-14 11:40:20 +01:00
commit c4919c5945

View file

@ -9,7 +9,9 @@
let
fakeRestic = pkgs.writeShellScriptBin "restic" ''
# Answers from the files named by FAKE_SNAPSHOTS and FAKE_STATS; an unset
# variable makes that subcommand fail.
# variable makes that subcommand fail, and so does a call without --no-lock:
# the metrics only read, and must not wait on a lock.
case " $* " in *" --no-lock "*) ;; *) exit 1 ;; esac
case " $* " in
*" snapshots "*) [ -n "''${FAKE_SNAPSHOTS:-}" ] && cat "$FAKE_SNAPSHOTS" ;;
*" stats "*) [ -n "''${FAKE_STATS:-}" ] && cat "$FAKE_STATS" ;;