From f785fd61c190b7baca73e29f8dce21e1f0e237ff Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 7 Oct 2026 13:37:26 +0000 Subject: [PATCH] :zap: Log where the exporter worker points at boot A worker that cannot reach its backends fails every turn with a network error, and the curing question is always where it was looking. The boot now says it once: pollers, queue, redis host and backend URI (host only, never credentials). AI-assisted-by: glm-5.3-flash --- exporter/src/app/consumer/worker.cljs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/exporter/src/app/consumer/worker.cljs b/exporter/src/app/consumer/worker.cljs index 5b292da98f..0f02c6034a 100644 --- a/exporter/src/app/consumer/worker.cljs +++ b/exporter/src/app/consumer/worker.cljs @@ -103,6 +103,14 @@ (p/delay reconnect-delay-ms))) (p/fmap (fn [_] (p/recur)))))) +(defn- redis-host + "The host of `:redis-uri`, for the boot log. Host only: a URI can + carry credentials and those never reach a log line." + [] + (try + (.-host (js/URL. (cf/get :redis-uri))) + (catch :default _ "?"))) + ;; ---- THE START (defn start! @@ -112,6 +120,12 @@ [] (let [key (queue-key) k (ccfg/concurrency)] + ;; Where this process points, said once at boot: a worker that + ;; cannot reach its backends fails every turn with a network error, + ;; and the curing question is always "where was it looking". + ;; Host only, never credentials. + (l/info :hint "worker started" :pollers k :queue key + :redis-host (redis-host) :backend (str (cf/get-internal-uri))) (doseq [i (range k)] (let [conn (connect!)] (swap! pollers assoc i conn)