Add logging

This commit is contained in:
Roman Chvanikov 2020-01-28 16:52:20 +03:00
parent 7f78bd7e37
commit dea968463d
1 changed files with 3 additions and 0 deletions

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 @@ def perform(
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