mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-10 19:29:11 +00:00
explicitly describe perform op in AttachmentsClenupWorker
This commit is contained in:
parent
86c4b76bf0
commit
52e08ec9fd
1 changed files with 5 additions and 2 deletions
|
@ -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