From 2543fdc5e41e41ed0f6947112e715f6994185b8e Mon Sep 17 00:00:00 2001 From: John Wiseman Date: Mon, 25 May 2020 17:52:39 -0700 Subject: [PATCH] Switch to JSON from EDN. --- advisorycircular.sh | 2 +- src/main/lemondronor/advisorycircular.cljs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/advisorycircular.sh b/advisorycircular.sh index 3ef6c62..d00a0c2 100644 --- a/advisorycircular.sh +++ b/advisorycircular.sh @@ -9,5 +9,5 @@ sqb_path=/usr/local/share/advisorycircular/clean-basestation.sqb config_path="$config_dir"/"$instance"-config.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") diff --git a/src/main/lemondronor/advisorycircular.cljs b/src/main/lemondronor/advisorycircular.cljs index 16b302e..56762ef 100644 --- a/src/main/lemondronor/advisorycircular.cljs +++ b/src/main/lemondronor/advisorycircular.cljs @@ -165,7 +165,8 @@ (defn read-history-db [path] (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) db))