diff options
author | Christopher Baines <mail@cbaines.net> | 2024-05-10 20:32:50 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2024-05-10 21:08:01 +0100 |
commit | 2800a89314f48ba2d089e2ba61fe086438ca13b2 (patch) | |
tree | 7bcabb206cc2d29bf0bee802310813b6485d24db /guix-build-coordinator | |
parent | a138c55173a66713b808f0d5f5b21d7048e5d6c8 (diff) | |
download | build-coordinator-2800a89314f48ba2d089e2ba61fe086438ca13b2.tar build-coordinator-2800a89314f48ba2d089e2ba61fe086438ca13b2.tar.gz |
Use with-port-timeouts when recompressing log files
To avoid using alarm.
Diffstat (limited to 'guix-build-coordinator')
-rw-r--r-- | guix-build-coordinator/hooks.scm | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/guix-build-coordinator/hooks.scm b/guix-build-coordinator/hooks.scm index bf4b576..bc055c2 100644 --- a/guix-build-coordinator/hooks.scm +++ b/guix-build-coordinator/hooks.scm @@ -528,18 +528,18 @@ (unless (eq? source-compression recompress-to) (when (file-exists? tmp-output-log-file) (delete-file tmp-output-log-file)) - (with-timeout timeout - (raise-exception - (make-exception-with-message "timeout recompressing log file")) - (call-with-compressed-input-file - source-log-file - source-compression - (lambda (input-port) - (call-with-compressed-output-file - tmp-output-log-file - recompress-to - (lambda (output-port) - (dump-port input-port output-port)))))) + (with-port-timeouts + (lambda () + (call-with-compressed-input-file + source-log-file + source-compression + (lambda (input-port) + (call-with-compressed-output-file + tmp-output-log-file + recompress-to + (lambda (output-port) + (dump-port input-port output-port)))))) + #:timeout timeout) (rename-file tmp-output-log-file output-log-file) (delete-file source-log-file))))) |