Return a number from count-guix-revisions
This commit is contained in:
parent
e38db9eed9
commit
857ac36711
2 changed files with 5 additions and 8 deletions
|
|
@ -30,10 +30,10 @@
|
||||||
guix-revisions-cgit-url-bases))
|
guix-revisions-cgit-url-bases))
|
||||||
|
|
||||||
(define (count-guix-revisions conn)
|
(define (count-guix-revisions conn)
|
||||||
(first
|
(match (exec-query
|
||||||
(exec-query
|
|
||||||
conn
|
conn
|
||||||
"SELECT COUNT(*) FROM guix_revisions")))
|
"SELECT COUNT(*) FROM guix_revisions")
|
||||||
|
(((x)) (string->number x))))
|
||||||
|
|
||||||
(define (most-recent-n-guix-revisions conn n)
|
(define (most-recent-n-guix-revisions conn n)
|
||||||
(exec-query conn "SELECT * FROM guix_revisions ORDER BY id DESC LIMIT 10"))
|
(exec-query conn "SELECT * FROM guix_revisions ORDER BY id DESC LIMIT 10"))
|
||||||
|
|
|
||||||
|
|
@ -348,10 +348,7 @@
|
||||||
(with-postgresql-connection
|
(with-postgresql-connection
|
||||||
"web healthcheck"
|
"web healthcheck"
|
||||||
(lambda (conn)
|
(lambda (conn)
|
||||||
(number?
|
(number? (count-guix-revisions conn)))))
|
||||||
(string->number
|
|
||||||
(first
|
|
||||||
(count-guix-revisions conn)))))))
|
|
||||||
(lambda (key . args)
|
(lambda (key . args)
|
||||||
#f))))
|
#f))))
|
||||||
(render-json
|
(render-json
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue