Add logging
authorRoman Chvanikov <chvanikoff@pm.me>
Tue, 28 Jan 2020 13:52:20 +0000 (16:52 +0300)
committerRoman Chvanikov <chvanikoff@pm.me>
Tue, 28 Jan 2020 13:52:20 +0000 (16:52 +0300)
lib/pleroma/workers/attachments_cleanup_worker.ex

index ce6998a548451b9228e6a42126ff79563a9ce532..c6a033e9cf6512286fe43ebc81bf5c5837541f7e 100644 (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