Skip to content

Commit

Permalink
add masking log
Browse files Browse the repository at this point in the history
  • Loading branch information
zip committed May 13, 2024
1 parent e14b4b6 commit 4e517fa
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/metabase/query_processor/streaming/pii_masking.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4e517fa

Please sign in to comment.