cbaines pushed a commit to branch master
in repository data-service.
commit 53ddb26300ec16a2aafb9885919663c10d5149f4
Author: Christopher Baines <[email protected]>
AuthorDate: Sun Sep 8 12:58:39 2024 +0100
Don't use the reserved pool for HTML/JSON responses
Just use it for providing substitutes.
---
guix-data-service/web/controller.scm | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/guix-data-service/web/controller.scm
b/guix-data-service/web/controller.scm
index cb94263..d23c2f3 100644
--- a/guix-data-service/web/controller.scm
+++ b/guix-data-service/web/controller.scm
@@ -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