diff options
Diffstat (limited to 'guix-data-service/web')
-rw-r--r-- | guix-data-service/web/revision/controller.scm | 47 |
1 files changed, 27 insertions, 20 deletions
diff --git a/guix-data-service/web/revision/controller.scm b/guix-data-service/web/revision/controller.scm index aa7f226..5aeed49 100644 --- a/guix-data-service/web/revision/controller.scm +++ b/guix-data-service/web/revision/controller.scm @@ -1069,8 +1069,8 @@ (assq-ref query-parameters 'field))) (letpar& ((derivations - (with-resource-from-pool (connection-pool) conn - (if search-query + (if search-query + (with-resource-from-pool (connection-pool) conn (search-package-derivations-in-revision conn commit-hash @@ -1088,24 +1088,31 @@ string->symbol) #:limit-results limit-results #:after-name (assq-ref query-parameters 'after_name) - #:include-builds? (member "builds" fields)) - (select-package-derivations-in-revision - conn - commit-hash - #:systems (assq-ref query-parameters 'system) - #:targets (assq-ref query-parameters 'target) - #:maximum-builds (assq-ref query-parameters 'maximum_builds) - #:minimum-builds (assq-ref query-parameters 'minimum_builds) - #:build-from-build-servers (assq-ref query-parameters - 'build_from_build_server) - #:no-build-from-build-servers (assq-ref query-parameters - 'no_build_from_build_server) - #:build-status (and=> (assq-ref query-parameters - 'build_status) - string->symbol) - #:limit-results limit-results - #:after-name (assq-ref query-parameters 'after_name) - #:include-builds? (member "builds" fields))))) + #:include-builds? (member "builds" fields))) + (concatenate! + (par-map& + (lambda (system) + (with-resource-from-pool (connection-pool) conn + (select-package-derivations-in-revision + conn + commit-hash + #:system system + #:targets (assq-ref query-parameters 'target) + #:maximum-builds (assq-ref query-parameters 'maximum_builds) + #:minimum-builds (assq-ref query-parameters 'minimum_builds) + #:build-from-build-servers (assq-ref query-parameters + 'build_from_build_server) + #:no-build-from-build-servers (assq-ref query-parameters + 'no_build_from_build_server) + #:build-status (and=> (assq-ref query-parameters + 'build_status) + string->symbol) + #:limit-results limit-results + #:after-name (assq-ref query-parameters 'after_name) + #:include-builds? (member "builds" fields)))) + (or (assq-ref query-parameters 'system) + (call-with-resource-from-pool (connection-pool) + list-systems)))))) (build-server-urls (call-with-resource-from-pool (connection-pool) select-build-server-urls-by-id))) |