mirror of
https://github.com/penpot/penpot.git
synced 2025-07-17 03:25:12 +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
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue