Use letpar& for systems and targets in render-compare/derivations

This commit is contained in:
Christopher Baines 2020-10-09 19:30:48 +01:00
parent 8daf35e2df
commit 853aaa6a7c

View file

@ -520,16 +520,19 @@
(render-json (render-json
'((error . "invalid query")))) '((error . "invalid query"))))
(else (else
(letpar& ((systems
(with-thread-postgresql-connection
valid-systems))
(targets
(with-thread-postgresql-connection
valid-targets)))
(render-html (render-html
#:sxml (compare/derivations #:sxml (compare/derivations
query-parameters query-parameters
(parallel-via-thread-pool-channel systems
(with-thread-postgresql-connection valid-systems)) (valid-targets->options targets)
(valid-targets->options
(parallel-via-thread-pool-channel
(with-thread-postgresql-connection valid-targets)))
build-status-strings build-status-strings
'())))) '())))))
(let ((base-commit (assq-ref query-parameters 'base_commit)) (let ((base-commit (assq-ref query-parameters 'base_commit))
(target-commit (assq-ref query-parameters 'target_commit)) (target-commit (assq-ref query-parameters 'target_commit))
@ -562,17 +565,20 @@
derivation-changes derivation-changes
#:extra-headers http-headers-for-unchanging-content)) #:extra-headers http-headers-for-unchanging-content))
(else (else
(render-html (letpar& ((systems
#:sxml (compare/derivations (with-thread-postgresql-connection
query-parameters valid-systems))
(parallel-via-thread-pool-channel (targets
(with-thread-postgresql-connection valid-systems)) (with-thread-postgresql-connection
(valid-targets->options valid-targets)))
(parallel-via-thread-pool-channel (render-html
(with-thread-postgresql-connection valid-targets))) #:sxml (compare/derivations
build-status-strings query-parameters
derivation-changes) systems
#:extra-headers http-headers-for-unchanging-content)))))))))) (valid-targets->options targets)
build-status-strings
derivation-changes)
#:extra-headers http-headers-for-unchanging-content)))))))))))
(define (render-compare-by-datetime/derivations mime-types (define (render-compare-by-datetime/derivations mime-types
query-parameters) query-parameters)