forked from AkkomaGang/akkoma
TEMP: add cleanup worker logging
This commit is contained in:
parent
fe8395c2cd
commit
e41d35180e
1 changed files with 4 additions and 0 deletions
|
@ -10,6 +10,8 @@ defmodule Pleroma.Workers.AttachmentsCleanupWorker do
|
|||
|
||||
use Pleroma.Workers.WorkerHelper, queue: "attachments_cleanup"
|
||||
|
||||
require Logger
|
||||
|
||||
@impl Oban.Worker
|
||||
def perform(%Job{
|
||||
args: %{
|
||||
|
@ -18,6 +20,8 @@ def perform(%Job{
|
|||
}
|
||||
}) do
|
||||
if Pleroma.Config.get([:instance, :cleanup_attachments], false) do
|
||||
Logger.notice("EASY_TO_GREP_ACW: Trying to cleanup #{inspect(attachments)}")
|
||||
|
||||
attachments
|
||||
|> Enum.flat_map(fn item -> Enum.map(item["url"], & &1["href"]) end)
|
||||
|> fetch_objects
|
||||
|
|
Loading…
Reference in a new issue