Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into seanking/pleroma...
authorlain <lain@soykaf.club>
Thu, 3 Sep 2020 09:29:39 +0000 (11:29 +0200)
committerlain <lain@soykaf.club>
Thu, 3 Sep 2020 09:29:39 +0000 (11:29 +0200)
1  2 
lib/mix/tasks/pleroma/frontend.ex

index 0a48be1fe978c54176d683dba86a14f301236233,484af6da70bd3d77ba6aa3c91b0499e6490aa3d4..1957b1d84c42a7faf4ae7b03bf32e39d298345a1
@@@ -69,7 -69,7 +69,7 @@@ defmodule Mix.Tasks.Pleroma.Frontend d
  
      fe_label = "#{frontend} (#{ref})"
  
 -    tmp_dir = Path.join(dest, "tmp")
 +    tmp_dir = Path.join([instance_static_dir, "frontends", "tmp"])
  
      with {_, :ok} <-
             {:download_or_unzip, download_or_unzip(frontend_info, tmp_dir, options[:file])},
      url = String.replace(frontend_info["build_url"], "${ref}", frontend_info["ref"])
  
      with {:ok, %{status: 200, body: zip_body}} <-
-            Pleroma.HTTP.get(url, [], timeout: 120_000, recv_timeout: 120_000) do
+            Pleroma.HTTP.get(url, [],
+              adapter: [pool: :media, timeout: 120_000, recv_timeout: 120_000]
+            ) do
        unzip(zip_body, dest)
      else
        e -> {:error, e}
  
    defp install_frontend(frontend_info, source, dest) do
      from = frontend_info["build_dir"] || "dist"
 +    File.rm_rf!(dest)
      File.mkdir_p!(dest)
      File.cp_r!(Path.join([source, from]), dest)
      :ok