Tesla.Middleware.Timeout breaks streaming bodies

These are executed by Oban now and Oban can enforce the timeout if the regular HTTP timeout is not sufficient.
This commit is contained in:
Mark Felder 2024-08-27 21:55:06 -04:00
parent 0a86d2b3ac
commit 116fe77b77

View file

@ -96,12 +96,9 @@ defmodule Pleroma.Web.RichMedia.Helpers do
end end
defp http_options do defp http_options do
timeout = Config.get!([:rich_media, :timeout])
[ [
pool: :rich_media, pool: :rich_media,
max_body: Config.get([:rich_media, :max_body], 5_000_000), max_body: Config.get([:rich_media, :max_body], 5_000_000),
tesla_middleware: [{Tesla.Middleware.Timeout, timeout: timeout}],
stream: true stream: true
] ]
end end