From 4e517faabb32b28bf5fa6fa963262c88a7881986 Mon Sep 17 00:00:00 2001 From: zip Date: Mon, 13 May 2024 17:31:56 +0800 Subject: [PATCH] add masking log --- src/metabase/query_processor/streaming/pii_masking.clj | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/metabase/query_processor/streaming/pii_masking.clj b/src/metabase/query_processor/streaming/pii_masking.clj index ddf075a424668..e55c319e5b798 100644 --- a/src/metabase/query_processor/streaming/pii_masking.clj +++ b/src/metabase/query_processor/streaming/pii_masking.clj @@ -11,10 +11,14 @@ (let [data {:data (assoc metadata :rows rows) :user_info current-user} json-str (json/generate-string data) api-url (or (config/config-str :jerry-pii-masking-api) "http://127.0.0.1:5500/api/mask") - api-timeout-ms (or (config/config-int :jerry-pii-masking-api-timeout) 10000) + api-timeout-ms (or (config/config-int :jerry-pii-masking-api-timeout) 8000) start-time (System/currentTimeMillis) + _ (log/info (trs "Jerry Pii Masking {0}. set timeout {1}" api-url api-timeout-ms)) response (try - (http/post api-url {:form-params data, :content-type :json, :timeout api-timeout-ms}) + (http/post api-url {:form-params data + :content-type :json + :socket-timeout api-timeout-ms + :connection-timeout api-timeout-ms}) (catch Exception e {:status 400, :body (.getMessage e)}))] (try