mirror of
https://github.com/logseq/logseq.git
synced 2026-05-23 20:24:15 +00:00
fix: no need to load db from disk since data is written directly
This commit is contained in:
@@ -214,11 +214,7 @@
|
||||
(state/<invoke-db-worker :thread-api/release-access-handles repo))
|
||||
|
||||
(<fetch-initial-data [_this repo opts]
|
||||
(-> (p/let [db-exists? (state/<invoke-db-worker :thread-api/db-exists repo)
|
||||
disk-db-data (when-not db-exists? (ipc/ipc :db-get repo))
|
||||
_ (when disk-db-data
|
||||
(state/<invoke-db-worker-direct-pass :thread-api/import-db repo disk-db-data))
|
||||
_ (state/<invoke-db-worker :thread-api/create-or-open-db repo opts)]
|
||||
(-> (p/let [_ (state/<invoke-db-worker :thread-api/create-or-open-db repo opts)]
|
||||
(state/<invoke-db-worker :thread-api/get-initial-data repo opts))
|
||||
(p/catch sqlite-error-handler)))
|
||||
|
||||
|
||||
@@ -896,7 +896,7 @@
|
||||
backup-db-fn (get-in (platform/current) [:sqlite :backup-db])]
|
||||
(when-not db
|
||||
(throw (ex-info "graph not opened" {:code :graph-not-opened
|
||||
:repo repo})))
|
||||
:repo repo})))
|
||||
(when-not (fn? backup-db-fn)
|
||||
(throw (ex-info "platform sqlite backup not supported"
|
||||
{:code :backup-not-supported
|
||||
|
||||
Reference in New Issue
Block a user