aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2023-06-30 18:05:08 +0100
committerChristopher Baines <mail@cbaines.net>2023-06-30 18:06:29 +0100
commit47232d62ca53b9595c326660a70158ff978c3e02 (patch)
tree6488b817a0c1a88c3a96cb2cac6bbe0b1e22c0f6
parentdac017b56c6867a90374dd58cc7605e13d3575ab (diff)
downloadnar-herder-47232d62ca53b9595c326660a70158ff978c3e02.tar
nar-herder-47232d62ca53b9595c326660a70158ff978c3e02.tar.gz
Refactor, making some code less nested
-rw-r--r--nar-herder/storage.scm17
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