Warn on copy failure

This commit is contained in:
byte[] 2022-11-05 09:44:34 -04:00
parent 464cc26a85
commit a7ffde8f89

View file

@ -71,9 +71,13 @@ defmodule Philomena.Objects do
# |> ExAws.request!(opts[:config_overrides]) # |> ExAws.request!(opts[:config_overrides])
# end) # end)
file_path = Briefly.create!() try do
download_file(source_key, file_path) file_path = Briefly.create!()
upload(dest_key, file_path) download_file(source_key, file_path)
upload(dest_key, file_path)
rescue
_ -> Logger.warn("Failed to copy #{source_key} -> #{dest_key}")
end
end end
# #