diff options
author | Maksim Pechnikov <parallel588@gmail.com> | 2020-06-03 14:56:54 +0300 |
---|---|---|
committer | Maksim Pechnikov <parallel588@gmail.com> | 2020-06-03 21:10:41 +0300 |
commit | 3fd27954122655f7a18bb75f35ad129024796010 (patch) | |
tree | 9a7a262f54013494813535869a3e69eff6acdb18 /lib | |
parent | 64b7b0ee3b13602b8984f17069e59673894b1f3b (diff) | |
download | pleroma-3fd27954122655f7a18bb75f35ad129024796010.tar.gz |
fix purge script
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/activity_pub/activity_pub.ex | 2 | ||||
-rw-r--r-- | lib/pleroma/workers/attachments_cleanup_worker.ex | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex index 6e407103f..c49972e8d 100644 --- a/lib/pleroma/web/activity_pub/activity_pub.ex +++ b/lib/pleroma/web/activity_pub/activity_pub.ex @@ -302,7 +302,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do :ok <- maybe_federate(activity) do {:ok, activity} else - {type, true, activity} when type in [:fake, :quick_insert] -> + {error, true, activity} when error in [:fake, :quick_insert] -> {:ok, activity} {:error, message} -> diff --git a/lib/pleroma/workers/attachments_cleanup_worker.ex b/lib/pleroma/workers/attachments_cleanup_worker.ex index e2a37a942..170bca976 100644 --- a/lib/pleroma/workers/attachments_cleanup_worker.ex +++ b/lib/pleroma/workers/attachments_cleanup_worker.ex @@ -75,7 +75,7 @@ defmodule Pleroma.Workers.AttachmentsCleanupWorker do defp delete_objects(_), do: :ok - defp cache_purge(true, urls), do: MediaProxy.Invalidation.purge(urls) + defp cache_purge(true, [_ | _] = urls), do: MediaProxy.Invalidation.purge(urls) defp cache_purge(_, _), do: :ok defp lock_attachments(true, urls), do: MediaProxy.put_in_deleted_urls(urls) |