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
|
||||
def perform(
|
||||
%{"object" => %{"data" => %{"attachment" => [_ | _] = attachments, "actor" => actor}}},
|
||||
%{
|
||||
"op" => "cleanup_attachments",
|
||||
"object" => %{"data" => %{"attachment" => [_ | _] = attachments, "actor" => actor}}
|
||||
} = data,
|
||||
_job
|
||||
) do
|
||||
hrefs =
|
||||
@ -84,5 +87,5 @@ def perform(
|
||||
|> Repo.delete_all()
|
||||
end
|
||||
|
||||
def perform(%{"object" => _object}, _job), do: :ok
|
||||
def perform(%{"op" => "cleanup_attachments", "object" => _object}, _job), do: :ok
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user