[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06/06: Support not querying pending builds
From: |
Christopher Baines |
Subject: |
06/06: Support not querying pending builds |
Date: |
Sun, 1 Nov 2020 17:53:33 -0500 (EST) |
cbaines pushed a commit to branch master
in repository data-service.
commit 375a6a37dca07cab81749805e5e4a07d3ac72cc4
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Sun Nov 1 22:52:53 2020 +0000
Support not querying pending builds
As this can take some time.
---
guix-data-service/builds.scm | 14 +++++++++-----
scripts/guix-data-service-query-build-servers.in | 7 ++++++-
2 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/guix-data-service/builds.scm b/guix-data-service/builds.scm
index 38c853a..fdae811 100644
--- a/guix-data-service/builds.scm
+++ b/guix-data-service/builds.scm
@@ -144,7 +144,8 @@ WHERE status IN ('started', 'scheduled')
(define* (query-build-servers conn build-server-ids systems
revision-commits
outputs
- #:key verbose?)
+ #:key verbose?
+ (query-pending-builds? #t))
(cleanup-bad-build-data conn)
(parameterize
((verbose-output? verbose?))
@@ -170,7 +171,8 @@ WHERE status IN ('started', 'scheduled')
url
systems
revision-commits
- outputs))))
+ outputs
+ query-pending-builds?))))
(lambda (key . args)
(simple-format
(current-error-port)
@@ -178,7 +180,8 @@ WHERE status IN ('started', 'scheduled')
key args)))))))
build-servers)))))
-(define (query-build-server conn id url systems revision-commits outputs)
+(define (query-build-server conn id url systems revision-commits outputs
+ query-pending-builds?)
(define (fetch-derivation-output-details-set-id output)
(match (exec-query
conn
@@ -197,8 +200,9 @@ WHERE derivation_output_details.path = $1"
(string->number id))
(() #f)))
- (simple-format #t "\nFetching pending builds\n")
- (process-pending-builds conn id systems revision-commits url)
+ (when query-pending-builds?
+ (simple-format #t "\nFetching pending builds\n")
+ (process-pending-builds conn id systems revision-commits url))
(simple-format #t "\nFetching unseen derivations\n")
(process-derivation-outputs
conn id url
diff --git a/scripts/guix-data-service-query-build-servers.in
b/scripts/guix-data-service-query-build-servers.in
index ba92a9e..b386ee1 100644
--- a/scripts/guix-data-service-query-build-servers.in
+++ b/scripts/guix-data-service-query-build-servers.in
@@ -44,6 +44,9 @@
(or (assoc-ref result 'systems)
'()))
(alist-delete 'systems result))))
+ (option '("dont-query-pending-builds") #f #f
+ (lambda (opt name _ result)
+ (alist-cons 'dont-query-pending-builds #t result)))
(option '("verbose") #f #f
(lambda (opt name _ result)
(alist-cons 'verbose #t result)))))
@@ -78,4 +81,6 @@
(assq-ref opts 'systems)
(assq-ref opts 'revision-commits)
(assq-ref opts 'outputs)
- #:verbose? (assq-ref opts 'verbose)))))
+ #:verbose? (assq-ref opts 'verbose)
+ #:query-pending-builds?
+ (not (assq-ref opts 'dont-query-pending-builds))))))
- branch master updated (e394d1d -> 375a6a3), Christopher Baines, 2020/11/01
- 02/06: Improve verbose output for fetching build information, Christopher Baines, 2020/11/01
- 01/06: Fix call-with-time-logging in (guix-data-service utils), Christopher Baines, 2020/11/01
- 04/06: Support limiting fetching pending builds to specific revisions, Christopher Baines, 2020/11/01
- 05/06: Allow only fetching builds for a specific system, Christopher Baines, 2020/11/01
- 03/06: Only query recent pending builds, Christopher Baines, 2020/11/01
- 06/06: Support not querying pending builds,
Christopher Baines <=