mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-28 03:13:13 +00:00
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 @@ defmodule Pleroma.Workers.AttachmentsCleanupWorker do
|
|||
|> 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 a new issue