fix: don't record local txs for remote graph

This commit is contained in:
Tienson Qin
2026-01-30 02:00:09 +08:00
parent a02d157cab
commit de1c58b02a
8 changed files with 71 additions and 87 deletions

View File

@@ -134,12 +134,13 @@
(let [full-graph-name (string/lower-case (str config/db-version-prefix graph-name))]
(some #(= (some-> (:url %) string/lower-case) full-graph-name) (state/get-repos))))
(defn- create-db [full-graph-name {:keys [file-graph-import?]}]
(defn- create-db [full-graph-name {:keys [file-graph-import? remote-graph?]}]
(->
(p/let [config config/config-default-content
_ (persist-db/<new full-graph-name
(cond-> {:config config
:graph-git-sha config/revision}
:graph-git-sha config/revision
:remote-graph? remote-graph?}
file-graph-import? (assoc :import-type :file-graph)))
_ (start-repo-db-if-not-exists! full-graph-name)
_ (state/add-repo! {:url full-graph-name :root (config/get-local-dir full-graph-name)})