From: Roman Chvanikov Date: Tue, 28 Jan 2020 00:52:35 +0000 (+0300) Subject: explicitly describe perform op in AttachmentsClenupWorker X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=52e08ec9fdbfa780f24b19afd2533fb83a55d586;p=akkoma explicitly describe perform op in AttachmentsClenupWorker --- diff --git a/lib/pleroma/workers/attachments_cleanup_worker.ex b/lib/pleroma/workers/attachments_cleanup_worker.ex index 595001ccb..23720ec56 100644 --- a/lib/pleroma/workers/attachments_cleanup_worker.ex +++ b/lib/pleroma/workers/attachments_cleanup_worker.ex @@ -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