aboutsummaryrefslogtreecommitdiff
path: root/guix-build-coordinator
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2022-05-22 11:06:48 +0100
committerChristopher Baines <mail@cbaines.net>2022-05-22 11:06:48 +0100
commit9971e83db3f7fd676d95d4af99a9fcd3350331bf (patch)
tree013b324d5c6922eff1e4fd4052badcbfdccbe664 /guix-build-coordinator
parentf03ec8ec1e0aed28c046024a2131ea7484037b55 (diff)
downloadbuild-coordinator-9971e83db3f7fd676d95d4af99a9fcd3350331bf.tar
build-coordinator-9971e83db3f7fd676d95d4af99a9fcd3350331bf.tar.gz
Add delay logging around submitting builds
Diffstat (limited to 'guix-build-coordinator')
-rw-r--r--guix-build-coordinator/client-communication.scm6
-rw-r--r--guix-build-coordinator/coordinator.scm6
2 files changed, 8 insertions, 4 deletions
diff --git a/guix-build-coordinator/client-communication.scm b/guix-build-coordinator/client-communication.scm
index 27f98ff..9d0b7d1 100644
--- a/guix-build-coordinator/client-communication.scm
+++ b/guix-build-coordinator/client-communication.scm
@@ -398,8 +398,9 @@
(read-derivation-from-file derivation-file)))
(let ((submit-build-result
- (apply
+ (call-with-delay-logging
submit-build
+ #:args
`(,build-coordinator
,derivation-file
#:read-drv
@@ -435,7 +436,8 @@
(lambda (date)
`(#:defer-until
,(string->date date "~Y-~m-~d ~H:~M:~S"))))
- '())))))
+ '()))
+ #:threshold 10)))
(render-json submit-build-result))))
(_
(render-json
diff --git a/guix-build-coordinator/coordinator.scm b/guix-build-coordinator/coordinator.scm
index 16ac81d..06882de 100644
--- a/guix-build-coordinator/coordinator.scm
+++ b/guix-build-coordinator/coordinator.scm
@@ -414,7 +414,7 @@
(build-for-derivation-exists?))
'((no-build-submitted . build-already-exists-for-this-derivation))
(if (and ignore-if-build-for-outputs-exists?
- (build-for-output-already-exists?))
+ (call-with-delay-logging build-for-output-already-exists?))
'((no-build-submitted . build-already-exists-for-a-output))
(begin
;; Store the derivation first, so that listing related
@@ -422,7 +422,9 @@
(unless (datastore-find-derivation datastore derivation-file)
(datastore-store-derivation
datastore
- (read-drv derivation-file)))
+ (call-with-delay-logging read-drv
+ #:threshold 10
+ #:args (list derivation-file))))
(let ((related-derivations-lacking-builds
(if ensure-all-related-derivation-outputs-have-builds?