mirror of
https://github.com/penpot/penpot.git
synced 2025-01-09 00:10:11 -05:00
✨ Don't log exception on health check fail
This commit is contained in:
parent
748499a26f
commit
89e64236b0
1 changed files with 8 additions and 2 deletions
|
@ -8,6 +8,7 @@
|
||||||
(:refer-clojure :exclude [error-handler])
|
(:refer-clojure :exclude [error-handler])
|
||||||
(:require
|
(:require
|
||||||
[app.common.exceptions :as ex]
|
[app.common.exceptions :as ex]
|
||||||
|
[app.common.logging :as l]
|
||||||
[app.common.pprint :as pp]
|
[app.common.pprint :as pp]
|
||||||
[app.common.uuid :as uuid]
|
[app.common.uuid :as uuid]
|
||||||
[app.config :as cf]
|
[app.config :as cf]
|
||||||
|
@ -341,8 +342,13 @@
|
||||||
"Mainly a task that performs a health check."
|
"Mainly a task that performs a health check."
|
||||||
[{:keys [pool]} _]
|
[{:keys [pool]} _]
|
||||||
(db/with-atomic [conn pool]
|
(db/with-atomic [conn pool]
|
||||||
(db/exec-one! conn ["select count(*) as count from server_prop;"])
|
(try
|
||||||
(yrs/response 200 "OK")))
|
(db/exec-one! conn ["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")))))
|
||||||
|
|
||||||
(defn changelog-handler
|
(defn changelog-handler
|
||||||
[_ _]
|
[_ _]
|
||||||
|
|
Loading…
Reference in a new issue