mirror of
https://github.com/penpot/penpot.git
synced 2025-03-13 00:01:51 -05:00
Merge branch 'main' into develop
This commit is contained in:
commit
50bc1b0347
1 changed files with 6 additions and 2 deletions
|
@ -163,17 +163,21 @@
|
||||||
;; Subscribe to corresponding topics
|
;; Subscribe to corresponding topics
|
||||||
(a/<! (msgbus :sub {:topics [file-id team-id] :chan sub-ch}))
|
(a/<! (msgbus :sub {:topics [file-id team-id] :chan sub-ch}))
|
||||||
(a/<! (handle-connect cfg))
|
(a/<! (handle-connect cfg))
|
||||||
|
|
||||||
|
;; when connection is closed
|
||||||
|
(mtx-aconn :dec)
|
||||||
|
(mtx-sessions :observe (/ (inst-ms (dt/duration-between created-at (dt/now))) 1000.0))
|
||||||
|
|
||||||
|
;; close subscription
|
||||||
(a/close! sub-ch))))
|
(a/close! sub-ch))))
|
||||||
|
|
||||||
(on-error [_conn e]
|
(on-error [_conn e]
|
||||||
(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))
|
||||||
(log/tracef "on-error %s (%s)" (:session-id cfg) (ex-message e))
|
(log/tracef "on-error %s (%s)" (:session-id cfg) (ex-message e))
|
||||||
(a/close! out-ch)
|
(a/close! out-ch)
|
||||||
(a/close! rcv-ch))
|
(a/close! rcv-ch))
|
||||||
|
|
||||||
(on-close [_conn _status _reason]
|
(on-close [_conn _status _reason]
|
||||||
(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))
|
||||||
(log/tracef "on-close %s" (:session-id cfg))
|
(log/tracef "on-close %s" (:session-id cfg))
|
||||||
(a/close! out-ch)
|
(a/close! out-ch)
|
||||||
|
|
Loading…
Add table
Reference in a new issue