Return a number from count-guix-revisions

This commit is contained in:
Christopher Baines 2020-09-20 18:38:39 +01:00
parent e38db9eed9
commit 857ac36711
2 changed files with 5 additions and 8 deletions

View file

@ -30,10 +30,10 @@
guix-revisions-cgit-url-bases))
(define (count-guix-revisions conn)
(first
(exec-query
conn
"SELECT COUNT(*) FROM guix_revisions")))
(match (exec-query
conn
"SELECT COUNT(*) FROM guix_revisions")
(((x)) (string->number x))))
(define (most-recent-n-guix-revisions conn n)
(exec-query conn "SELECT * FROM guix_revisions ORDER BY id DESC LIMIT 10"))

View file

@ -348,10 +348,7 @@
(with-postgresql-connection
"web healthcheck"
(lambda (conn)
(number?
(string->number
(first
(count-guix-revisions conn)))))))
(number? (count-guix-revisions conn)))))
(lambda (key . args)
#f))))
(render-json