Skip to content
Snippets Groups Projects
Unverified Commit ce3285d4 authored by github-automation-metabase's avatar github-automation-metabase Committed by GitHub
Browse files

keep the keys in send-pulse task history underscored (#48601) (#48606)


Co-authored-by: default avatarNgoc Khuat <qn.khuat@gmail.com>
parent 6576ff21
Branches
Tags
No related merge requests found
......@@ -291,8 +291,8 @@
retry-config (retry/retry-configuration)
retry-errors (volatile! [])
retry-report (fn []
{:attempted-retries (count @retry-errors)
:retry-errors @retry-errors})
{:attempted_retries (count @retry-errors)
:retry_errors @retry-errors})
send! (fn []
(try
(channel/send! channel message)
......@@ -309,10 +309,10 @@
(update :task_details merge (retry-report))))
:on-fail-info (fn [update-map _result]
(update update-map :task_details #(merge % (retry-report))))
:task_details {:retry-config retry-config
:channel-type (:type channel)
:channel-id (:id channel)
:pulse-id pulse-id}}
:task_details {:retry_config retry-config
:channel_type (:type channel)
:channel_id (:id channel)
:pulse_id pulse-id}}
((retry/decorate send! (retry/random-exponential-backoff-retry (str (random-uuid)) retry-config)))
(log/debugf "[Pulse %d] Sent to channel %s with %d retries" pulse-id (format-channel channel) (count @retry-errors))))
(catch Throwable e
......
......@@ -862,10 +862,10 @@
retry-initial-interval 1]
(mt/with-model-cleanup [:model/TaskHistory]
(let [pulse-id (rand-int 10000)
default-task-details {:pulse-id pulse-id
:channel-type "channel/slack"
:channel-id nil
:retry-config {:max-attempts 4
default-task-details {:pulse_id pulse-id
:channel_type "channel/slack"
:channel_id nil
:retry_config {:max-attempts 4
:initial-interval-millis 1
:multiplier 2.0
:randomization-factor 0.1
......@@ -888,8 +888,8 @@
:db_id nil
:status :success
:task_details (merge default-task-details
{:attempted-retries 2
:retry-errors (mt/malli=?
{:attempted_retries 2
:retry_errors (mt/malli=?
[:sequential {:min 2 :max 2}
[:map
[:trace :any]
......@@ -904,8 +904,8 @@
:db_id nil
:status :failed
:task_details {:original-info default-task-details
:attempted-retries 4
:retry-errors (mt/malli=?
:attempted_retries 4
:retry_errors (mt/malli=?
[:sequential {:min 4 :max 4}
[:map
[:trace :any]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment