Skip to content

Commit 6fc7231

Browse files
authored
Use apply/3 to avoid Elixir 1.17 warnings (#754)
1 parent 930d22d commit 6fc7231

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/sentry/integrations/oban/error_reporter.ex

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,10 @@ defmodule Sentry.Integrations.Oban.ErrorReporter do
2424
:no_config
2525
) :: :ok
2626
def handle_event([:oban, :job, :exception], _measurements, %{job: job} = _metadata, :no_config) do
27-
oban_worker_mod = Oban.Worker
2827
%{reason: exception, stacktrace: stacktrace} = job.unsaved_error
2928

3029
stacktrace =
31-
case {oban_worker_mod.from_string(job.worker), stacktrace} do
30+
case {apply(Oban.Worker, :from_string, [job.worker]), stacktrace} do
3231
{{:ok, atom_worker}, []} -> [{atom_worker, :process, 1, []}]
3332
_ -> stacktrace
3433
end

0 commit comments

Comments
 (0)