mirror of
https://github.com/logseq/logseq.git
synced 2026-06-02 11:21:22 +00:00
fix: don't run sync for local graphs that's detached from server
This commit is contained in:
@@ -147,10 +147,19 @@
|
||||
coerced))
|
||||
body))
|
||||
|
||||
(defn- graph-in-remote-list?
|
||||
[repo]
|
||||
(some #(= repo (:url %)) (state/get-rtc-graphs)))
|
||||
|
||||
(defn <rtc-start!
|
||||
[repo & {:keys [_stop-before-start?] :as _opts}]
|
||||
(log/info :db-sync/start {:repo repo})
|
||||
(state/<invoke-db-worker :thread-api/db-sync-start repo))
|
||||
(if (graph-in-remote-list? repo)
|
||||
(do
|
||||
(log/info :db-sync/start {:repo repo})
|
||||
(state/<invoke-db-worker :thread-api/db-sync-start repo))
|
||||
(do
|
||||
(log/info :db-sync/skip-start {:repo repo :reason :graph-not-in-remote-list})
|
||||
(p/resolved nil))))
|
||||
|
||||
(defn <rtc-stop!
|
||||
[]
|
||||
|
||||
Reference in New Issue
Block a user