0
Fork 0
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:
Andrey Antukh 2023-01-23 09:59:55 +01:00
parent fa17ce5d40
commit 504f75a1cf

View file

@ -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
[_ _]