[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/11: Use letpar& for systems and targets in render-compare/derivations
From: |
Christopher Baines |
Subject: |
05/11: Use letpar& for systems and targets in render-compare/derivations |
Date: |
Fri, 9 Oct 2020 15:21:19 -0400 (EDT) |
cbaines pushed a commit to branch master
in repository data-service.
commit 853aaa6a7ceac047d6d876459a98ca6b0ecd8df1
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Fri Oct 9 19:30:48 2020 +0100
Use letpar& for systems and targets in render-compare/derivations
---
guix-data-service/web/compare/controller.scm | 40 ++++++++++++++++------------
1 file changed, 23 insertions(+), 17 deletions(-)
diff --git a/guix-data-service/web/compare/controller.scm
b/guix-data-service/web/compare/controller.scm
index 17b5550..07b03be 100644
--- a/guix-data-service/web/compare/controller.scm
+++ b/guix-data-service/web/compare/controller.scm
@@ -520,16 +520,19 @@
(render-json
'((error . "invalid query"))))
(else
+ (letpar& ((systems
+ (with-thread-postgresql-connection
+ valid-systems))
+ (targets
+ (with-thread-postgresql-connection
+ valid-targets)))
(render-html
#:sxml (compare/derivations
query-parameters
- (parallel-via-thread-pool-channel
- (with-thread-postgresql-connection valid-systems))
- (valid-targets->options
- (parallel-via-thread-pool-channel
- (with-thread-postgresql-connection valid-targets)))
+ systems
+ (valid-targets->options targets)
build-status-strings
- '()))))
+ '())))))
(let ((base-commit (assq-ref query-parameters 'base_commit))
(target-commit (assq-ref query-parameters 'target_commit))
@@ -562,17 +565,20 @@
derivation-changes
#:extra-headers http-headers-for-unchanging-content))
(else
- (render-html
- #:sxml (compare/derivations
- query-parameters
- (parallel-via-thread-pool-channel
- (with-thread-postgresql-connection valid-systems))
- (valid-targets->options
- (parallel-via-thread-pool-channel
- (with-thread-postgresql-connection
valid-targets)))
- build-status-strings
- derivation-changes)
- #:extra-headers
http-headers-for-unchanging-content))))))))))
+ (letpar& ((systems
+ (with-thread-postgresql-connection
+ valid-systems))
+ (targets
+ (with-thread-postgresql-connection
+ valid-targets)))
+ (render-html
+ #:sxml (compare/derivations
+ query-parameters
+ systems
+ (valid-targets->options targets)
+ build-status-strings
+ derivation-changes)
+ #:extra-headers
http-headers-for-unchanging-content)))))))))))
(define (render-compare-by-datetime/derivations mime-types
query-parameters)
- branch master updated (f1eb2d3 -> 4f3be14), Christopher Baines, 2020/10/09
- 01/11: Guard against derivation IDs that aren't numbers, Christopher Baines, 2020/10/09
- 02/11: Guard against errors when recording job stderr output, Christopher Baines, 2020/10/09
- 04/11: Change the derivation comparison targets, Christopher Baines, 2020/10/09
- 03/11: Link to the revisions in the comparison header, Christopher Baines, 2020/10/09
- 05/11: Use letpar& for systems and targets in render-compare/derivations,
Christopher Baines <=
- 06/11: Clarify that the derivations comparison only is for packages, Christopher Baines, 2020/10/09
- 08/11: Include tablespace as a label for table metrics, Christopher Baines, 2020/10/09
- 09/11: Include the base commit and target commit in the compare output, Christopher Baines, 2020/10/09
- 07/11: Improve select-job-for-commit, Christopher Baines, 2020/10/09
- 10/11: Add Prometheus metrics for indexes specifically, Christopher Baines, 2020/10/09
- 11/11: Split the jobs metric in to succeede, queued and failed, Christopher Baines, 2020/10/09