Support not querying pending builds
As this can take some time.
This commit is contained in:
parent
f485423d5a
commit
375a6a37dc
2 changed files with 15 additions and 6 deletions
|
|
@ -144,7 +144,8 @@ WHERE status IN ('started', 'scheduled')
|
||||||
(define* (query-build-servers conn build-server-ids systems
|
(define* (query-build-servers conn build-server-ids systems
|
||||||
revision-commits
|
revision-commits
|
||||||
outputs
|
outputs
|
||||||
#:key verbose?)
|
#:key verbose?
|
||||||
|
(query-pending-builds? #t))
|
||||||
(cleanup-bad-build-data conn)
|
(cleanup-bad-build-data conn)
|
||||||
(parameterize
|
(parameterize
|
||||||
((verbose-output? verbose?))
|
((verbose-output? verbose?))
|
||||||
|
|
@ -170,7 +171,8 @@ WHERE status IN ('started', 'scheduled')
|
||||||
url
|
url
|
||||||
systems
|
systems
|
||||||
revision-commits
|
revision-commits
|
||||||
outputs))))
|
outputs
|
||||||
|
query-pending-builds?))))
|
||||||
(lambda (key . args)
|
(lambda (key . args)
|
||||||
(simple-format
|
(simple-format
|
||||||
(current-error-port)
|
(current-error-port)
|
||||||
|
|
@ -178,7 +180,8 @@ WHERE status IN ('started', 'scheduled')
|
||||||
key args)))))))
|
key args)))))))
|
||||||
build-servers)))))
|
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)
|
(define (fetch-derivation-output-details-set-id output)
|
||||||
(match (exec-query
|
(match (exec-query
|
||||||
conn
|
conn
|
||||||
|
|
@ -197,8 +200,9 @@ WHERE derivation_output_details.path = $1"
|
||||||
(string->number id))
|
(string->number id))
|
||||||
(() #f)))
|
(() #f)))
|
||||||
|
|
||||||
(simple-format #t "\nFetching pending builds\n")
|
(when query-pending-builds?
|
||||||
(process-pending-builds conn id systems revision-commits url)
|
(simple-format #t "\nFetching pending builds\n")
|
||||||
|
(process-pending-builds conn id systems revision-commits url))
|
||||||
(simple-format #t "\nFetching unseen derivations\n")
|
(simple-format #t "\nFetching unseen derivations\n")
|
||||||
(process-derivation-outputs
|
(process-derivation-outputs
|
||||||
conn id url
|
conn id url
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,9 @@
|
||||||
(or (assoc-ref result 'systems)
|
(or (assoc-ref result 'systems)
|
||||||
'()))
|
'()))
|
||||||
(alist-delete 'systems result))))
|
(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
|
(option '("verbose") #f #f
|
||||||
(lambda (opt name _ result)
|
(lambda (opt name _ result)
|
||||||
(alist-cons 'verbose #t result)))))
|
(alist-cons 'verbose #t result)))))
|
||||||
|
|
@ -78,4 +81,6 @@
|
||||||
(assq-ref opts 'systems)
|
(assq-ref opts 'systems)
|
||||||
(assq-ref opts 'revision-commits)
|
(assq-ref opts 'revision-commits)
|
||||||
(assq-ref opts 'outputs)
|
(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))))))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue