aboutsummaryrefslogtreecommitdiff
path: root/guix-build-coordinator/datastore/sqlite.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix-build-coordinator/datastore/sqlite.scm')
-rw-r--r--guix-build-coordinator/datastore/sqlite.scm11
1 files changed, 9 insertions, 2 deletions
diff --git a/guix-build-coordinator/datastore/sqlite.scm b/guix-build-coordinator/datastore/sqlite.scm
index 94a3154..061f05a 100644
--- a/guix-build-coordinator/datastore/sqlite.scm
+++ b/guix-build-coordinator/datastore/sqlite.scm
@@ -361,6 +361,13 @@ PRAGMA optimize;")))))
result))
(thunk)))
+(define (call-with-worker-thread/delay-logging channel proc)
+ (call-with-worker-thread channel
+ proc
+ #:duration-logger
+ (lambda (duration)
+ (log-delay proc duration))))
+
(define %current-transaction-proc
(make-parameter #f))
@@ -2352,7 +2359,7 @@ VALUES (:event, :arguments)"
(define-method (datastore-count-unprocessed-hook-events
(datastore <sqlite-datastore>))
- (call-with-worker-thread
+ (call-with-worker-thread/delay-logging
(slot-ref datastore 'worker-reader-thread-channel)
(lambda (db)
(let ((statement
@@ -2513,7 +2520,7 @@ INSERT INTO build_allocation_plan (build_id, agent_id, ordering) VALUES "
(define-method (datastore-count-allocated-builds
(datastore <sqlite-datastore>))
- (call-with-worker-thread
+ (call-with-worker-thread/delay-logging
(slot-ref datastore 'worker-reader-thread-channel)
(lambda (db)
(let ((statement