Use connection pools.
This commit is contained in:
parent
4d5161b16d
commit
ec83175100
5 changed files with 9 additions and 5 deletions
|
|
@ -147,7 +147,7 @@ defmodule Pleroma.Web.Salmon do
|
|||
end
|
||||
|
||||
defp send_to_user(%{info: %{"salmon" => salmon}}, feed, poster) do
|
||||
with {:ok, %{status_code: code}} <- poster.(salmon, feed, [{"Content-Type", "application/magic-envelope+xml"}], timeout: 10000, recv_timeout: 20000) do
|
||||
with {:ok, %{status_code: code}} <- poster.(salmon, feed, [{"Content-Type", "application/magic-envelope+xml"}], timeout: 10000, recv_timeout: 20000, hackney: [pool: :default]) do
|
||||
Logger.debug(fn -> "Pushed to #{salmon}, code #{code}" end)
|
||||
else
|
||||
e -> Logger.debug(fn -> "Pushing salmon to #{salmon} failed, #{inspect(e)}" end)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue