Switch to JSON from EDN.
This commit is contained in:
parent
4ee19d1a14
commit
2543fdc5e4
@ -9,5 +9,5 @@ sqb_path=/usr/local/share/advisorycircular/clean-basestation.sqb
|
|||||||
|
|
||||||
config_path="$config_dir"/"$instance"-config.yaml
|
config_path="$config_dir"/"$instance"-config.yaml
|
||||||
secrets_path="$config_dir"/"$instance"-secrets.yaml
|
secrets_path="$config_dir"/"$instance"-secrets.yaml
|
||||||
history_path="$run_dir"/"$instance"-history.edn
|
history_path="$run_dir"/"$instance"-history.json
|
||||||
(cd "$run_dir" && "$dir"/intervalexec 10 node $dir/out/advisorycircular.js --config "$config_path" --secrets "$secrets_path" --basestation-sqb "$sqb_path" --history "$history_path" --log-prefix "$instance")
|
(cd "$run_dir" && "$dir"/intervalexec 10 node $dir/out/advisorycircular.js --config "$config_path" --secrets "$secrets_path" --basestation-sqb "$sqb_path" --history "$history_path" --log-prefix "$instance")
|
||||||
|
@ -165,7 +165,8 @@
|
|||||||
|
|
||||||
(defn read-history-db [path]
|
(defn read-history-db [path]
|
||||||
(p/let [json-str (util/read-file path {:encoding "utf-8"})
|
(p/let [json-str (util/read-file path {:encoding "utf-8"})
|
||||||
db (js->clj (.parse js/JSON json-str))]
|
db (js->clj (.parse js/JSON json-str) :keywordize-keys true)
|
||||||
|
db (into {} (map (fn [[k v]] [(name k) v]) db))]
|
||||||
(log-verbose "Loaded %s aircraft from database %s" (count db) path)
|
(log-verbose "Loaded %s aircraft from database %s" (count db) path)
|
||||||
db))
|
db))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user