Skip to content

Commit

Permalink
Newest test
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaspazza committed Jan 4, 2024
1 parent e0ea6f8 commit 9387653
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/clj/automaton_core/storage/component.clj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
:access access})
(catch Throwable e (core-log/fatal (ex-info "Storage component failed." {:error e})))))

(defstate storage-state :start (start-storage) :stop (.release storage-state))
(defstate storage-state :start (start-storage) :stop (.release (:connection @storage-state)))

(defn upsert [storage update-fn] (core-log/trace "Executed: " update-fn) (storage/upsert (:access storage) (:connection storage) update-fn))

Expand Down
8 changes: 2 additions & 6 deletions src/cljc/automaton_core/configuration/simple_files.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,8 @@

(defn- warn-on-overwrite
[ms]
(doseq [[k kvs] (group-by key (apply concat ms))
:let [vs (map val kvs)]
:when (and (next kvs) (not= (first vs) (last vs)))]
(println "WARNING: configuration keys are duplicated"
{:k k
:vs vs})))
(let [kseq (reduce (fn [acc m] (concat acc (keys m))) [] ms)]
(for [[id freq] (frequencies kseq) :when (> freq 1)] (println "WARNING: configuration keys are duplicated for:" id))))

(defn merge-configs [& m] (warn-on-overwrite m) (apply utils-map/deep-merge m))

Expand Down
4 changes: 2 additions & 2 deletions version.edn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
;;Last generated version, note a failed push consume a number
{:major-version "0.0.-1"
:minor-version 52
:version "0.0.52"}
:minor-version 54
:version "0.0.54"}

0 comments on commit 9387653

Please sign in to comment.