diff --git a/exporter/src/app/core.cljs b/exporter/src/app/core.cljs index 430ab8ca9..80e7d8e62 100644 --- a/exporter/src/app/core.cljs +++ b/exporter/src/app/core.cljs @@ -9,7 +9,7 @@ ["process" :as proc] [app.browser :as bwr] [app.common.logging :as l] - [app.config] + [app.config :as cf] [app.http :as http] [app.redis :as redis] [promesa.core :as p])) @@ -19,7 +19,9 @@ (defn start [& _] - (l/info :msg "initializing") + (l/info :msg "initializing" + :public-uri (str (cf/get :public-uri)) + :version (:full @cf/version)) (p/do! (bwr/init) (redis/init) @@ -39,5 +41,6 @@ (http/stop) (done))) -(proc/on "uncaughtException" (fn [cause] - (js/console.error cause))) +(proc/on "uncaughtException" + (fn [cause] + (js/console.error cause))) diff --git a/exporter/src/app/handlers/export_shapes.cljs b/exporter/src/app/handlers/export_shapes.cljs index 3356ffc6a..4a8e53dab 100644 --- a/exporter/src/app/handlers/export_shapes.cljs +++ b/exporter/src/app/handlers/export_shapes.cljs @@ -77,7 +77,7 @@ :name (:name resource) :status "ended"})))) on-error (fn [cause] - (l/error :hint "unexpected error happened on export multiple process" + (l/error :hint "unexpected error on export multiple" :cause cause) (if wait (p/rejected cause) diff --git a/exporter/src/app/http.cljs b/exporter/src/app/http.cljs index f07aac8c4..e0d492129 100644 --- a/exporter/src/app/http.cljs +++ b/exporter/src/app/http.cljs @@ -90,12 +90,13 @@ (fn [{:keys [:response/body :response/status] :as exchange}] (cond (map? body) - (let [data (t/encode-str body {:type :json-verbose})] + (let [data (t/encode-str body {:type :json-verbose}) + size (js/Buffer.byteLength data "utf-8")] (-> exchange (assoc :response/body data) (assoc :response/status 200) (update :response/headers assoc "content-type" "application/transit+json") - (update :response/headers assoc "content-length" (count data)))) + (update :response/headers assoc "content-length" size))) (and (nil? body) (= 200 status))