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))
|
||||
|
||||
(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"))
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue