diff --git a/src/clj/auto_ap/datomic.clj b/src/clj/auto_ap/datomic.clj index 40b45729..bff703d2 100644 --- a/src/clj/auto_ap/datomic.clj +++ b/src/clj/auto_ap/datomic.clj @@ -16,6 +16,7 @@ (mount/defstate client :start (dc/client (:client-config env)) :stop nil) + (mount/defstate conn :start (dc/connect client {:db-name (:db-name env)}) :stop nil) diff --git a/src/clj/auto_ap/jobs/restore_from_backup.clj b/src/clj/auto_ap/jobs/restore_from_backup.clj index d4523cde..00b54640 100644 --- a/src/clj/auto_ap/jobs/restore_from_backup.clj +++ b/src/clj/auto_ap/jobs/restore_from_backup.clj @@ -119,7 +119,7 @@ (doseq [entity (or item-list (filter (complement (conj @loaded "audit")) (order-of-insert entity-dependencies))) :let [_ (swap! loaded conj entity) _ (println "querying for " entity) - entities (ednl/slurp (pull-file backup-id (str entity "ednl"))) + entities (ednl/slurp (pull-file backup-id (str entity ".ednl"))) _ (println "Found some! here's a few: " (take 3 entities)) tx-chan (a/chan 50) @@ -146,5 +146,7 @@ ;; cloud load (comment - (load-from-backup "a1975512-9091-49d1-a348-ee445363ba34" auto-ap.datomic/conn ["vendor"])) + (load-from-backup "a1975512-9091-49d1-a348-ee445363ba34" auto-ap.datomic/conn ) + + ) ;; => nil