Minor enhacements on log processing.

This commit is contained in:
Andrey Antukh 2021-12-23 18:36:58 +01:00
parent c6054f7ab2
commit 1839397ebc
10 changed files with 83 additions and 108 deletions

View file

@ -266,13 +266,8 @@
(= ::noop (:strategy edata))
(assoc :inc-by 0))
(let [cdata (get-error-context error item)]
(l/update-thread-context! cdata)
(l/error :cause error
:hint "unhandled exception on task"
:id (:id cdata))
(l/with-context (get-error-context error item)
(l/error :cause error :hint "unhandled exception on task")
(if (>= (:retry-num item) (:max-retries item))
{:status :failed :task item :error error}
{:status :retry :task item :error error})))))