Add logging

This commit is contained in:
Roman Chvanikov 2020-01-28 16:52:20 +03:00
parent 7f78bd7e37
commit dea968463d

View File

@ -8,6 +8,8 @@ defmodule Pleroma.Workers.AttachmentsCleanupWorker do
alias Pleroma.Object
alias Pleroma.Repo
require Logger
use Pleroma.Workers.WorkerHelper, queue: "attachments_cleanup"
@impl Oban.Worker
@ -77,6 +79,7 @@ defmodule Pleroma.Workers.AttachmentsCleanupWorker do
file_path = String.trim_leading(href, "#{base_url}/#{prefix}")
Logger.warn("Deleting file #{file_path} (orig: #{href}, base_url: #{base_url})")
uploader.delete_file(file_path)
end