mirror of
https://github.com/penpot/penpot.git
synced 2025-06-11 04:51:39 +02:00
✨ Add debug messages on notifications module.
This commit is contained in:
parent
688d649c4a
commit
d89bf772a6
2 changed files with 5 additions and 0 deletions
|
@ -64,6 +64,8 @@
|
||||||
sub-buff (a/chan 1)
|
sub-buff (a/chan 1)
|
||||||
cch (a/chan 1)]
|
cch (a/chan 1)]
|
||||||
|
|
||||||
|
(log/debugf "initializing msgbus (uri: '%s')" (str uri))
|
||||||
|
|
||||||
;; Start the sending (publishing) loop
|
;; Start the sending (publishing) loop
|
||||||
(impl-publish-loop snd-conn snd-buff cch)
|
(impl-publish-loop snd-conn snd-buff cch)
|
||||||
|
|
||||||
|
|
|
@ -144,6 +144,7 @@
|
||||||
ws-send (mtx/wrap-counter ws-send mtx-messages ["send"])]
|
ws-send (mtx/wrap-counter ws-send mtx-messages ["send"])]
|
||||||
|
|
||||||
(letfn [(on-connect [conn]
|
(letfn [(on-connect [conn]
|
||||||
|
(log/debugf "on-connect %s" (:session-id cfg))
|
||||||
(mtx-aconn :inc)
|
(mtx-aconn :inc)
|
||||||
(let [sub (a/chan)
|
(let [sub (a/chan)
|
||||||
ws (WebSocket. conn in out sub nil cfg)]
|
ws (WebSocket. conn in out sub nil cfg)]
|
||||||
|
@ -164,12 +165,14 @@
|
||||||
(a/close! sub))))
|
(a/close! sub))))
|
||||||
|
|
||||||
(on-error [_conn _e]
|
(on-error [_conn _e]
|
||||||
|
(log/debugf "on-error %s" (:session-id cfg))
|
||||||
(mtx-aconn :dec)
|
(mtx-aconn :dec)
|
||||||
(mtx-sessions :observe (/ (inst-ms (dt/duration-between created-at (dt/now))) 1000.0))
|
(mtx-sessions :observe (/ (inst-ms (dt/duration-between created-at (dt/now))) 1000.0))
|
||||||
(a/close! out)
|
(a/close! out)
|
||||||
(a/close! in))
|
(a/close! in))
|
||||||
|
|
||||||
(on-close [_conn _status _reason]
|
(on-close [_conn _status _reason]
|
||||||
|
(log/debugf "on-close %s" (:session-id cfg))
|
||||||
(mtx-aconn :dec)
|
(mtx-aconn :dec)
|
||||||
(mtx-sessions :observe (/ (inst-ms (dt/duration-between created-at (dt/now))) 1000.0))
|
(mtx-sessions :observe (/ (inst-ms (dt/duration-between created-at (dt/now))) 1000.0))
|
||||||
(a/close! out)
|
(a/close! out)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue