chore: remove unused *sync-starting?

pull/6868/head
Tienson Qin 2022-09-30 17:02:07 +08:00
parent fd91db1449
commit 5f8d8e832c
1 changed files with 21 additions and 25 deletions

View File

@ -2931,9 +2931,8 @@
(declare network-online-cursor)
;; Prevent starting of multiple sync managers
(def *sync-starting? (atom {}))
(defn sync-start []
(defn sync-start
[]
(go
(let [*sync-state (atom (sync-state))
current-user-uuid (user/user-uuid)
@ -2948,8 +2947,6 @@
repo
(not (config/demo-graph? repo)))
(try
(when-not (get @*sync-starting? graph-uuid)
(swap! *sync-starting? assoc graph-uuid true)
(when-some [sm (sync-manager-singleton current-user-uuid graph-uuid
(config/get-repo-dir repo) repo
txid *sync-state)]
@ -2970,12 +2967,11 @@
(.start sm)
(offer! remote->local-full-sync-chan true)
(offer! full-sync-chan true)
(swap! *sync-starting? assoc graph-uuid false))))))
(offer! full-sync-chan true)))))
(catch :default e
(prn "Sync start error: ")
(log/error :exception e)
(swap! *sync-starting? assoc graph-uuid false))))))))
(log/error :exception e)))))))
)
;;; ### some add-watches