archive: read the repository without its lock for the prune metrics
This commit is contained in:
parent
b60779093e
commit
c4919c5945
1 changed files with 5 additions and 3 deletions
|
|
@ -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" ;;
|
||||
|
|
|
|||
Loading…
Reference in a new issue