fix: load global config synchronously instead of relying on watcher

This commit also refreshs the shortcuts when config files has been edited.
This commit is contained in:
Tienson Qin
2022-09-06 08:46:47 +08:00
committed by Andelf
parent 7ade955df7
commit 7fa9209e29
6 changed files with 91 additions and 91 deletions

View File

@@ -179,12 +179,9 @@
(restore-graph-from-text! repo stored)))
(defn restore!
[{:keys [repos]} _old-db-schema restore-config-handler]
(let [repo (or (state/get-current-repo) (:url (first repos)))]
(when repo
(p/let [_ (restore-graph! repo)]
(restore-config-handler repo)
(listen-and-persist! repo)))))
[repo]
(p/let [_ (restore-graph! repo)]
(listen-and-persist! repo)))
(defn run-batch-txs!
[]