334d66bf5d
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
18 lines
451 B
Elixir
18 lines
451 B
Elixir
defmodule Mobilizon.Service.Workers.BackgroundWorker do
|
|
@moduledoc """
|
|
Worker to build search results
|
|
"""
|
|
|
|
alias Mobilizon.Actors
|
|
alias Mobilizon.Actors.Actor
|
|
|
|
use Mobilizon.Service.Workers.WorkerHelper, queue: "background"
|
|
|
|
@impl Oban.Worker
|
|
def perform(%{"op" => "delete_actor", "actor_id" => actor_id}, _job) do
|
|
with %Actor{} = actor <- Actors.get_actor(actor_id) do
|
|
Actors.perform(:delete_actor, actor)
|
|
end
|
|
end
|
|
end
|