explicitly describe perform op in AttachmentsClenupWorker
This commit is contained in:
parent
86c4b76bf0
commit
52e08ec9fd
|
@ -12,7 +12,10 @@ defmodule Pleroma.Workers.AttachmentsCleanupWorker do
|
||||||
|
|
||||||
@impl Oban.Worker
|
@impl Oban.Worker
|
||||||
def perform(
|
def perform(
|
||||||
%{"object" => %{"data" => %{"attachment" => [_ | _] = attachments, "actor" => actor}}},
|
%{
|
||||||
|
"op" => "cleanup_attachments",
|
||||||
|
"object" => %{"data" => %{"attachment" => [_ | _] = attachments, "actor" => actor}}
|
||||||
|
} = data,
|
||||||
_job
|
_job
|
||||||
) do
|
) do
|
||||||
hrefs =
|
hrefs =
|
||||||
|
@ -84,5 +87,5 @@ def perform(
|
||||||
|> Repo.delete_all()
|
|> Repo.delete_all()
|
||||||
end
|
end
|
||||||
|
|
||||||
def perform(%{"object" => _object}, _job), do: :ok
|
def perform(%{"op" => "cleanup_attachments", "object" => _object}, _job), do: :ok
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue