0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-18 02:32:13 -05:00

Add debug messages on notifications module.

This commit is contained in:
Andrey Antukh 2021-02-22 19:10:05 +01:00
parent 688d649c4a
commit d89bf772a6
2 changed files with 5 additions and 0 deletions

View file

@ -64,6 +64,8 @@
sub-buff (a/chan 1)
cch (a/chan 1)]
(log/debugf "initializing msgbus (uri: '%s')" (str uri))
;; Start the sending (publishing) loop
(impl-publish-loop snd-conn snd-buff cch)

View file

@ -144,6 +144,7 @@
ws-send (mtx/wrap-counter ws-send mtx-messages ["send"])]
(letfn [(on-connect [conn]
(log/debugf "on-connect %s" (:session-id cfg))
(mtx-aconn :inc)
(let [sub (a/chan)
ws (WebSocket. conn in out sub nil cfg)]
@ -164,12 +165,14 @@
(a/close! sub))))
(on-error [_conn _e]
(log/debugf "on-error %s" (:session-id cfg))
(mtx-aconn :dec)
(mtx-sessions :observe (/ (inst-ms (dt/duration-between created-at (dt/now))) 1000.0))
(a/close! out)
(a/close! in))
(on-close [_conn _status _reason]
(log/debugf "on-close %s" (:session-id cfg))
(mtx-aconn :dec)
(mtx-sessions :observe (/ (inst-ms (dt/duration-between created-at (dt/now))) 1000.0))
(a/close! out)