Skip to content
Snippets Groups Projects
Commit 0bf61ef1 authored by Ludovic Courtès's avatar Ludovic Courtès
Browse files

http: Evaluate DB requests in 'non-blocking'.

* src/cuirass/http.scm (handle-builds-request): Wrap 'db-get-builds'
into 'non-blocking'.
parent 23fecf8f
No related branches found
No related tags found
No related merge requests found
......@@ -67,8 +67,11 @@
(define (handle-builds-request db filters)
"Retrieve all builds matched by FILTERS in DB and convert them to hydra
format."
(let ((builds (with-time-logging "builds request"
(db-get-builds db filters))))
;; Since these requests can take several seconds (!), run them through
;; 'non-blocking'.
(let ((builds (non-blocking
(with-time-logging "builds request"
(db-get-builds db filters)))))
(map build->hydra-build builds)))
(define (request-parameters request)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment