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
1 changed files with 13 additions and 2 deletions
|
@ -15,8 +15,19 @@ def start_link(_) do
|
||||||
|
|
||||||
@impl true
|
@impl true
|
||||||
def init(state) do
|
def init(state) do
|
||||||
:telemetry.attach("oban-monitor-failure", [:oban, :job, :exception], &handle_event/4, nil)
|
:telemetry.attach(
|
||||||
:telemetry.attach("oban-monitor-success", [:oban, :job, :stop], &handle_event/4, nil)
|
"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}
|
{:ok, state}
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue