[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/04: hydra/services: cleanup-cuirass-roots: Collect file names.
From: |
Ricardo Wurmus |
Subject: |
04/04: hydra/services: cleanup-cuirass-roots: Collect file names. |
Date: |
Wed, 22 Apr 2020 09:24:30 -0400 (EDT) |
rekado pushed a commit to branch master
in repository maintenance.
commit 9356e3c940a64fd2873d603742dc4d6176444cf8
Author: Ricardo Wurmus <address@hidden>
AuthorDate: Wed Apr 22 15:22:16 2020 +0200
hydra/services: cleanup-cuirass-roots: Collect file names.
* hydra/modules/sysadmin/services.scm (cleanup-cuirass-roots): Write
collected files to /gnu/big-stuff.
---
hydra/modules/sysadmin/services.scm | 29 +++++++++++++++++------------
1 file changed, 17 insertions(+), 12 deletions(-)
diff --git a/hydra/modules/sysadmin/services.scm
b/hydra/modules/sysadmin/services.scm
index 040dfcd..569dd91 100644
--- a/hydra/modules/sysadmin/services.scm
+++ b/hydra/modules/sysadmin/services.scm
@@ -71,22 +71,27 @@
(old? stat))
(catch 'system-error
(lambda ()
- (delete-file file))
+ (delete-file file)
+ (display file (current-output-port))
+ (newline (current-output-port)))
(lambda args
- (pk 'failed-to-delete file
- (system-error-errno args))))))
+ (format (current-error-port)
+ "failed to delete ~a ~a~%" file
+ (system-error-errno args))))))
;; Note: 'scandir' would introduce too much overhead due
;; to the large number of entries that it would sort.
- (file-system-fold (const #t) ;enter?
- handle-gc-root
- (const #t) ;down
- (const #t) ;up
- (const #t) ;skip
- (const #t) ;error
- #t
- %roots-directory
- lstat))))
+ (with-output-to-file "/gnu/big-stuff"
+ (lambda ()
+ (file-system-fold (const #t) ;enter?
+ handle-gc-root
+ (const #t) ;down
+ (const #t) ;up
+ (const #t) ;skip
+ (const #t) ;error
+ #t
+ %roots-directory
+ lstat))))))
(define %gc-jobs
;; The garbage collection mcron jobs.