Don't use the reserved pool for HTML/JSON responses
Just use it for providing substitutes.
This commit is contained in:
parent
395d0b2bd0
commit
53ddb26300
1 changed files with 11 additions and 11 deletions
|
|
@ -457,22 +457,22 @@
|
|||
|
||||
(define (render-derivation derivation-file-name)
|
||||
(letpar& ((derivation
|
||||
(with-resource-from-pool (reserved-connection-pool) conn
|
||||
(with-resource-from-pool (connection-pool) conn
|
||||
(select-derivation-by-file-name conn derivation-file-name))))
|
||||
|
||||
(if derivation
|
||||
(letpar& ((derivation-inputs
|
||||
(with-resource-from-pool (reserved-connection-pool) conn
|
||||
(with-resource-from-pool (connection-pool) conn
|
||||
(select-derivation-inputs-by-derivation-id
|
||||
conn
|
||||
(first derivation))))
|
||||
(derivation-outputs
|
||||
(with-resource-from-pool (reserved-connection-pool) conn
|
||||
(with-resource-from-pool (connection-pool) conn
|
||||
(select-derivation-outputs-by-derivation-id
|
||||
conn
|
||||
(first derivation))))
|
||||
(builds
|
||||
(with-resource-from-pool (reserved-connection-pool) conn
|
||||
(with-resource-from-pool (connection-pool) conn
|
||||
(select-builds-with-context-by-derivation-file-name
|
||||
conn
|
||||
(second derivation)))))
|
||||
|
|
@ -491,7 +491,7 @@
|
|||
|
||||
(define (render-json-derivation derivation-file-name)
|
||||
(let ((derivation
|
||||
(with-resource-from-pool (reserved-connection-pool) conn
|
||||
(with-resource-from-pool (connection-pool) conn
|
||||
(select-derivation-by-file-name conn
|
||||
derivation-file-name))))
|
||||
(if derivation
|
||||
|
|
@ -597,11 +597,11 @@
|
|||
|
||||
(define (render-store-item filename)
|
||||
(letpar& ((derivation
|
||||
(with-resource-from-pool (reserved-connection-pool) conn
|
||||
(with-resource-from-pool (connection-pool) conn
|
||||
(select-derivation-by-output-filename conn filename))))
|
||||
(match derivation
|
||||
(()
|
||||
(match (with-resource-from-pool (reserved-connection-pool) conn
|
||||
(match (with-resource-from-pool (connection-pool) conn
|
||||
(select-derivation-source-file-by-store-path conn filename))
|
||||
(()
|
||||
(render-html
|
||||
|
|
@ -613,17 +613,17 @@
|
|||
(render-html
|
||||
#:sxml (view-derivation-source-file
|
||||
filename
|
||||
(with-resource-from-pool (reserved-connection-pool) conn
|
||||
(with-resource-from-pool (connection-pool) conn
|
||||
(select-derivation-source-file-nar-details-by-file-name
|
||||
conn
|
||||
filename)))
|
||||
#:extra-headers http-headers-for-unchanging-content))))
|
||||
(derivations
|
||||
(letpar& ((nars
|
||||
(with-resource-from-pool (reserved-connection-pool) conn
|
||||
(with-resource-from-pool (connection-pool) conn
|
||||
(select-nars-for-output conn filename)))
|
||||
(builds
|
||||
(with-resource-from-pool (reserved-connection-pool) conn
|
||||
(with-resource-from-pool (connection-pool) conn
|
||||
(select-builds-with-context-by-derivation-output
|
||||
conn
|
||||
filename))))
|
||||
|
|
@ -840,7 +840,7 @@
|
|||
(('GET)
|
||||
(render-html
|
||||
#:sxml (index
|
||||
(with-resource-from-pool (reserved-connection-pool) conn
|
||||
(with-resource-from-pool (connection-pool) conn
|
||||
(map
|
||||
(lambda (git-repository-details)
|
||||
(cons
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue