Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
grzuy committed Aug 19, 2024
1 parent 3648bb4 commit 0d75a9f
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions lib/tower/oban_exception_handler.ex
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,23 @@ defmodule Tower.ObanExceptionHandler do

def handle_event(
[:oban, :job, :exception],
_measurements,
_event_measurements,
%{kind: kind, reason: reason, stacktrace: stacktrace},
_handler_config
) do
Tower.handle_caught(kind, reason, stacktrace)
end

def handle_event([:oban, :job, :exception], _, meta, _handler_config) do
Logger.warning("UNHANDLED OBAN EXCEPTION meta=#{inspect(meta, pretty: true)}")
def handle_event(
[:oban, :job, :exception],
_event_measurementes,
event_metadata,
_handler_config
) do
Logger.warning(
"UNHANDLED OBAN JOB EXCEPTION with event_metadata=#{inspect(event_metadata, pretty: true)}"
)

:ignored
end
end

0 comments on commit 0d75a9f

Please sign in to comment.