aboutsummaryrefslogtreecommitdiff
path: root/guix-build-coordinator
diff options
context:
space:
mode:
Diffstat (limited to 'guix-build-coordinator')
-rw-r--r--guix-build-coordinator/agent.scm3
-rw-r--r--guix-build-coordinator/coordinator.scm7
-rw-r--r--guix-build-coordinator/utils.scm12
3 files changed, 8 insertions, 14 deletions
diff --git a/guix-build-coordinator/agent.scm b/guix-build-coordinator/agent.scm
index 568fcc8..1b19fd7 100644
--- a/guix-build-coordinator/agent.scm
+++ b/guix-build-coordinator/agent.scm
@@ -261,8 +261,7 @@
(begin
(wait-condition-variable
uploads-condition-variable
- uploads-mutex
- (+ 240 (time-second (current-time))))
+ uploads-mutex)
(loop))))))
diff --git a/guix-build-coordinator/coordinator.scm b/guix-build-coordinator/coordinator.scm
index 5353fab..cece029 100644
--- a/guix-build-coordinator/coordinator.scm
+++ b/guix-build-coordinator/coordinator.scm
@@ -1069,8 +1069,6 @@
#:parallel? #t))
(define (start-hook-processing-threads build-coordinator parallel-hooks)
- (define wait-timeout-seconds (* 60 5))
-
(define datastore
(build-coordinator-datastore build-coordinator))
@@ -1174,10 +1172,7 @@
(while #t
(match (datastore-list-unprocessed-hook-events datastore event-name 1)
(()
- (wait-condition-variable condvar
- mtx
- (+ (time-second (current-time))
- wait-timeout-seconds)))
+ (wait-condition-variable condvar mtx))
(((id event arguments))
(process-event id event arguments handler)))))
(lambda (key . args)
diff --git a/guix-build-coordinator/utils.scm b/guix-build-coordinator/utils.scm
index afee6fc..84b4833 100644
--- a/guix-build-coordinator/utils.scm
+++ b/guix-build-coordinator/utils.scm
@@ -969,8 +969,7 @@ References: ~a~%"
;; #f from wait-condition-variable indicates a timeout
(if (wait-condition-variable
job-available
- queue-mutex
- (+ 9 (time-second (current-time))))
+ queue-mutex)
;; Another thread could have taken
;; the job in the mean time
(if (q-empty? queue)
@@ -1142,8 +1141,7 @@ References: ~a~%"
;; #f from wait-condition-variable indicates a timeout
(if (wait-condition-variable
job-available
- pool-mutex
- (+ 60 (time-second (current-time))))
+ pool-mutex)
(get-job running-jobs)
#f))))
(if job-args
@@ -1218,10 +1216,12 @@ References: ~a~%"
(when (= 0 idle-threads)
(start-new-threads-if-necessary (get-thread-count))))
+ ;; Wake a worker thread to check if a job is available
+ (signal-condition-variable job-available)
+
(wait-condition-variable
job-available
- pool-mutex
- (+ 60 (time-second (current-time)))))
+ pool-mutex))
#:unwind? #t))))
(start-new-threads-if-necessary (get-thread-count)))