Pad RichMediaWorker timeout to be 2s longer than the Rich Media HTTP timeout

This commit is contained in:
Mark Felder 2024-07-24 15:42:50 -04:00
commit 731f7b87d2
3 changed files with 14 additions and 3 deletions

View file

@ -69,9 +69,12 @@ defmodule Pleroma.Web.RichMedia.Helpers do
end
defp http_options do
timeout = Config.get!([:rich_media, :timeout])
[
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}]
]
end
end