diff options
author | Christopher Baines <mail@cbaines.net> | 2023-06-30 18:05:08 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2023-06-30 18:06:29 +0100 |
commit | 47232d62ca53b9595c326660a70158ff978c3e02 (patch) | |
tree | 6488b817a0c1a88c3a96cb2cac6bbe0b1e22c0f6 | |
parent | dac017b56c6867a90374dd58cc7605e13d3575ab (diff) | |
download | nar-herder-47232d62ca53b9595c326660a70158ff978c3e02.tar nar-herder-47232d62ca53b9595c326660a70158ff978c3e02.tar.gz |
Refactor, making some code less nested
-rw-r--r-- | nar-herder/storage.scm | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/nar-herder/storage.scm b/nar-herder/storage.scm index c5b2413..5555176 100644 --- a/nar-herder/storage.scm +++ b/nar-herder/storage.scm @@ -395,14 +395,15 @@ (call-with-output-file tmp-file-name (lambda (output-port) - (dump-port body output-port))) - (rename-file tmp-file-name - destination-file-name) - - (metric-increment nar-files-metric - #:label-values '((stored . "true"))) - (metric-decrement nar-files-metric - #:label-values '((stored . "false"))))))))) + (dump-port body output-port))))))) + + (rename-file tmp-file-name + destination-file-name) + + (metric-increment nar-files-metric + #:label-values '((stored . "true"))) + (metric-decrement nar-files-metric + #:label-values '((stored . "false"))))) (define (download-nars initial-storage-size) ;; If there's free space, then consider downloading missing nars |