mirror of
https://github.com/penpot/penpot.git
synced 2025-02-10 09:08:31 -05:00
🐛 Fix health check http endpoint
This commit is contained in:
parent
fa17ce5d40
commit
504f75a1cf
1 changed files with 8 additions and 9 deletions
|
@ -349,15 +349,14 @@
|
|||
|
||||
(defn health-handler
|
||||
"Mainly a task that performs a health check."
|
||||
[{:keys [pool]} _]
|
||||
(db/with-atomic [conn pool]
|
||||
[{:keys [::db/pool]} _]
|
||||
(try
|
||||
(db/exec-one! conn ["select count(*) as count from server_prop;"])
|
||||
(db/exec-one! pool ["select count(*) as count from server_prop;"])
|
||||
(yrs/response 200 "OK")
|
||||
(catch Throwable cause
|
||||
(l/warn :hint "unable to execute query on health handler"
|
||||
:cause cause)
|
||||
(yrs/response 503 "KO")))))
|
||||
(yrs/response 503 "KO"))))
|
||||
|
||||
(defn changelog-handler
|
||||
[_ _]
|
||||
|
|
Loading…
Add table
Reference in a new issue