mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-08 09:24:18 +00:00
Use fully qualified function capture for telementry event
Otherwise we get warnings on startup as local captures and anonymous functions are supposedly less performant.
This commit is contained in:
parent
a6df71eebb
commit
18ecae6183
|
@ -15,8 +15,19 @@ defmodule Pleroma.JobQueueMonitor do
|
|||
|
||||
@impl true
|
||||
def init(state) do
|
||||
:telemetry.attach("oban-monitor-failure", [:oban, :job, :exception], &handle_event/4, nil)
|
||||
:telemetry.attach("oban-monitor-success", [:oban, :job, :stop], &handle_event/4, nil)
|
||||
:telemetry.attach(
|
||||
"oban-monitor-failure",
|
||||
[:oban, :job, :exception],
|
||||
&Pleroma.JobQueueMonitor.handle_event/4,
|
||||
nil
|
||||
)
|
||||
|
||||
:telemetry.attach(
|
||||
"oban-monitor-success",
|
||||
[:oban, :job, :stop],
|
||||
&Pleroma.JobQueueMonitor.handle_event/4,
|
||||
nil
|
||||
)
|
||||
|
||||
{:ok, state}
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue