aboutsummaryrefslogtreecommitdiff
path: root/guix-build-coordinator
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2024-06-10 13:25:36 +0100
committerChristopher Baines <mail@cbaines.net>2024-06-10 13:25:36 +0100
commit666cf6b0b903dd14d8075b76151c5fb39bab5b61 (patch)
tree3fc13793849d8df0135c6547e866389ba9f53e5b /guix-build-coordinator
parent4ccfaffc1965cb4ed060bbd82a425026ab3bb36e (diff)
downloadbuild-coordinator-666cf6b0b903dd14d8075b76151c5fb39bab5b61.tar
build-coordinator-666cf6b0b903dd14d8075b76151c5fb39bab5b61.tar.gz
Change with-port-timeouts to use seconds for the timeout
Diffstat (limited to 'guix-build-coordinator')
-rw-r--r--guix-build-coordinator/agent.scm4
-rw-r--r--guix-build-coordinator/utils.scm5
2 files changed, 4 insertions, 5 deletions
diff --git a/guix-build-coordinator/agent.scm b/guix-build-coordinator/agent.scm
index 7c00ca1..7afd549 100644
--- a/guix-build-coordinator/agent.scm
+++ b/guix-build-coordinator/agent.scm
@@ -645,7 +645,7 @@ unable to query substitute servers without caching"))
(has-substiutes-no-cache?
non-derivation-substitute-urls
file))
- #:timeout (* 60 1000)))
+ #:timeout 60))
#:times 20
#:delay (random 15))
#f)))
@@ -707,7 +707,7 @@ but the guix-daemon claims it's unavailable"
((current-build-output-port log-port))
(build-things fetch-substitute-store
missing-paths)))
- #:timeout (* 60 10 1000)))
+ #:timeout (* 60 10)))
(lambda (key . args)
(log-msg lgr 'ERROR
"exception when fetching missing paths "
diff --git a/guix-build-coordinator/utils.scm b/guix-build-coordinator/utils.scm
index 0a3383c..d747962 100644
--- a/guix-build-coordinator/utils.scm
+++ b/guix-build-coordinator/utils.scm
@@ -215,7 +215,7 @@
(define port-write-timeout-error?
(record-predicate &port-write-timeout))
-(define* (with-port-timeouts thunk #:key (timeout (* 120 1000)))
+(define* (with-port-timeouts thunk #:key (timeout 120))
;; When the GC runs, it restarts the poll syscall, but the timeout remains
;; unchanged! When the timeout is longer than the time between the syscall
@@ -227,8 +227,7 @@
(define (wait port mode)
(let ((timeout-internal
(+ (get-internal-real-time)
- (* internal-time-units-per-second
- (/ timeout 1000)))))
+ (* internal-time-units-per-second timeout))))
(let loop ((poll-value
(port-poll port mode poll-timeout-ms)))
(if (= poll-value 0)