receiver_worker: log processes crashes
Some checks are pending
ci/woodpecker/pr/build-amd64 Pipeline is pending approval
ci/woodpecker/pr/build-arm64 Pipeline is pending approval
ci/woodpecker/pr/docs Pipeline is pending approval
ci/woodpecker/pr/lint Pipeline is pending approval
ci/woodpecker/pr/test Pipeline is pending approval
Some checks are pending
ci/woodpecker/pr/build-amd64 Pipeline is pending approval
ci/woodpecker/pr/build-arm64 Pipeline is pending approval
ci/woodpecker/pr/docs Pipeline is pending approval
ci/woodpecker/pr/lint Pipeline is pending approval
ci/woodpecker/pr/test Pipeline is pending approval
Oban cataches crashes to handle job failure and retry, thus it never bubbles up all the way and nothing is logged by default. For better debugging, catch and log any crashes.
This commit is contained in:
parent
8fa51700d4
commit
b441251aed
1 changed files with 7 additions and 0 deletions
|
@ -50,5 +50,12 @@ def perform(%Job{args: %{"op" => "incoming_ap_doc", "params" => params}}) do
|
|||
Logger.error("Unexpected AP doc error: (raw) #{inspect(e)} from #{inspect(params)}")
|
||||
{:error, e}
|
||||
end
|
||||
rescue
|
||||
err ->
|
||||
Logger.error(
|
||||
"Receiver worker CRASH on #{inspect(params)} with: #{Exception.format(:error, err, __STACKTRACE__)}"
|
||||
)
|
||||
|
||||
{:error, :crash}
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue