From 52e08ec9fdbfa780f24b19afd2533fb83a55d586 Mon Sep 17 00:00:00 2001 From: Roman Chvanikov Date: Tue, 28 Jan 2020 03:52:35 +0300 Subject: [PATCH] explicitly describe perform op in AttachmentsClenupWorker --- lib/pleroma/workers/attachments_cleanup_worker.ex | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 -- 2.45.2