mirror of
https://github.com/penpot/penpot.git
synced 2025-05-16 18:47:15 +02: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
|
(defn health-handler
|
||||||
"Mainly a task that performs a health check."
|
"Mainly a task that performs a health check."
|
||||||
[{:keys [pool]} _]
|
[{:keys [::db/pool]} _]
|
||||||
(db/with-atomic [conn pool]
|
|
||||||
(try
|
(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")
|
(yrs/response 200 "OK")
|
||||||
(catch Throwable cause
|
(catch Throwable cause
|
||||||
(l/warn :hint "unable to execute query on health handler"
|
(l/warn :hint "unable to execute query on health handler"
|
||||||
:cause cause)
|
:cause cause)
|
||||||
(yrs/response 503 "KO")))))
|
(yrs/response 503 "KO"))))
|
||||||
|
|
||||||
(defn changelog-handler
|
(defn changelog-handler
|
||||||
[_ _]
|
[_ _]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue