aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/http/ex_aws.ex
diff options
context:
space:
mode:
authorAlexander Strizhakov <alex.strizhakov@gmail.com>2020-08-19 10:22:59 +0300
committerAlexander Strizhakov <alex.strizhakov@gmail.com>2020-09-02 09:04:23 +0300
commitc17d83cd7330d5c874f647a5224a3a130ed88fb0 (patch)
tree663ed868abe80dfa1567e3070fbffca14dcadd7d /lib/pleroma/http/ex_aws.ex
parentd48755791ddfea0b30bc5a843dfc4181efd63982 (diff)
downloadpleroma-c17d83cd7330d5c874f647a5224a3a130ed88fb0.tar.gz
improvements and fixes for http requests
- fix for gun worker termination in some circumstances - pool for http clients (ex_aws, tzdata) - default pool timeouts for gun - gun retries on gun_down messages - s3 upload timeout if streaming enabled
Diffstat (limited to 'lib/pleroma/http/ex_aws.ex')
-rw-r--r--lib/pleroma/http/ex_aws.ex2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/pleroma/http/ex_aws.ex b/lib/pleroma/http/ex_aws.ex
index e53e64077..2fe8beafc 100644
--- a/lib/pleroma/http/ex_aws.ex
+++ b/lib/pleroma/http/ex_aws.ex
@@ -11,6 +11,8 @@ defmodule Pleroma.HTTP.ExAws do
@impl true
def request(method, url, body \\ "", headers \\ [], http_opts \\ []) do
+ http_opts = Keyword.put(http_opts, :adapter, pool: :upload)
+
case HTTP.request(method, url, body, headers, http_opts) do
{:ok, env} ->
{:ok, %{status_code: env.status, headers: env.headers, body: env.body}}