|
@@ -387,7 +387,7 @@ Essentially this procedure inverts the inversion-of-control that
|
|
;; Our shuffling algorithm is simple: we sort by .drv file name. :-)
|
|
;; Our shuffling algorithm is simple: we sort by .drv file name. :-)
|
|
(sort drv string<?))
|
|
(sort drv string<?))
|
|
|
|
|
|
-(define* (set-build-successful! drv #:optional log)
|
|
|
|
|
|
+(define* (set-build-successful! drv)
|
|
"Update the build status of DRV as successful and register any eventual
|
|
"Update the build status of DRV as successful and register any eventual
|
|
build products."
|
|
build products."
|
|
(let* ((build (db-get-build drv))
|
|
(let* ((build (db-get-build drv))
|
|
@@ -397,8 +397,7 @@ build products."
|
|
(when (and spec build)
|
|
(when (and spec build)
|
|
(create-build-outputs build
|
|
(create-build-outputs build
|
|
(specification-build-outputs spec))))
|
|
(specification-build-outputs spec))))
|
|
- (db-update-build-status! drv (build-status succeeded)
|
|
|
|
- #:log-file log))
|
|
|
|
|
|
+ (db-update-build-status! drv (build-status succeeded)))
|
|
|
|
|
|
(define (update-build-statuses! store lst)
|
|
(define (update-build-statuses! store lst)
|
|
"Update the build status of the derivations listed in LST, which have just
|
|
"Update the build status of the derivations listed in LST, which have just
|
|
@@ -484,7 +483,7 @@ items."
|
|
;; from PORT and eventually close it.
|
|
;; from PORT and eventually close it.
|
|
(catch #t
|
|
(catch #t
|
|
(lambda ()
|
|
(lambda ()
|
|
- (handle-build-event event))
|
|
|
|
|
|
+ (handle-build-event store event))
|
|
(exception-reporter state)))
|
|
(exception-reporter state)))
|
|
#t)
|
|
#t)
|
|
(close-port port)
|
|
(close-port port)
|
|
@@ -500,7 +499,7 @@ items."
|
|
|
|
|
|
(loop rest (max (- count max-batch-size) 0))))))
|
|
(loop rest (max (- count max-batch-size) 0))))))
|
|
|
|
|
|
-(define* (handle-build-event event)
|
|
|
|
|
|
+(define* (handle-build-event store event)
|
|
"Handle EVENT, a build event sexp as produced by 'build-event-output-port',
|
|
"Handle EVENT, a build event sexp as produced by 'build-event-output-port',
|
|
updating the database accordingly."
|
|
updating the database accordingly."
|
|
(define (valid? file)
|
|
(define (valid? file)
|
|
@@ -522,7 +521,8 @@ updating the database accordingly."
|
|
(if (valid? drv)
|
|
(if (valid? drv)
|
|
(begin
|
|
(begin
|
|
(log-message "build started: '~a'" drv)
|
|
(log-message "build started: '~a'" drv)
|
|
- (db-update-build-status! drv (build-status started)))
|
|
|
|
|
|
+ (db-update-build-status! drv (build-status started)
|
|
|
|
+ #:log-file (log-file store drv)))
|
|
(log-message "bogus build-started event for '~a'" drv)))
|
|
(log-message "bogus build-started event for '~a'" drv)))
|
|
(('build-remote drv host _ ...)
|
|
(('build-remote drv host _ ...)
|
|
(log-message "'~a' offloaded to '~a'" drv host)
|
|
(log-message "'~a' offloaded to '~a'" drv host)
|