aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-03-18 01:01:12 +0100
committerLudovic Courtès <ludo@gnu.org>2018-03-18 01:06:59 +0100
commit787969c9af165113f67903173e3feb1a3e50f703 (patch)
treebe6c7a7eeb360c288feeafb08182e66ed0cd0f2b /src
parent2096ebe63f857fa1e2ebeb5d524e5bb699d9ef61 (diff)
downloadcuirass-787969c9af165113f67903173e3feb1a3e50f703.tar
cuirass-787969c9af165113f67903173e3feb1a3e50f703.tar.gz
http: Correctly set #:timestamp for non-finished builds.
Fixes a regression introduced in f083282fd3bf813fda0b54ed33278d2d5325dfa1, whereby we'd return 0 as the timestamp for everything in /api/queue. * src/cuirass/http.scm (build->hydra-build): Make 'finished?' a Boolean. Move 'bool->int' call in #:finished definition.
Diffstat (limited to 'src')
-rw-r--r--src/cuirass/http.scm9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/cuirass/http.scm b/src/cuirass/http.scm
index 9a379da..3d9ce5a 100644
--- a/src/cuirass/http.scm
+++ b/src/cuirass/http.scm
@@ -36,10 +36,9 @@
(if bool 1 0))
(define finished?
- (bool->int
- (not (memv (assq-ref build #:status)
- (list (build-status scheduled)
- (build-status started))))))
+ (not (memv (assq-ref build #:status)
+ (list (build-status scheduled)
+ (build-status started)))))
`((#:id . ,(assq-ref build #:id))
(#:project . ,(assq-ref build #:repo-name))
@@ -62,7 +61,7 @@
(#:busy . ,(bool->int (eqv? (build-status started)
(assq-ref build #:status))))
(#:priority . 0)
- (#:finished . ,finished?)
+ (#:finished . ,(bool->int finished?))
(#:buildproducts . #nil)
(#:releasename . #nil)
(#:buildinputs_builds . #nil)))