Merge pull request 'Fix Finch timeout config options' (#939) from Oneric/akkoma:finch-timeouts into develop
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
Reviewed-on: #939
This commit is contained in:
commit
242e798054
5 changed files with 7 additions and 7 deletions
|
@ -35,6 +35,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||
- ActivityPub delivery attempts are spaced out more giving up after 3h instead of ~20min before
|
||||
- inboxes now fake a succcess reply on incoming Delete documents whose signing key is unknown but gone;
|
||||
this prevents older Mastodon from repeatedly trying to deliver Deletes of actors we never knew anyway
|
||||
- The config option `config :pleroma, :http, :pool_max_idle_time` was removed; it never actually
|
||||
did anything and was redundant with `config :pleroma, :http, :pool_timeout` which actually works.
|
||||
|
||||
## 2025.03
|
||||
|
||||
|
|
|
@ -181,14 +181,12 @@
|
|||
|
||||
# Configures http settings, upstream proxy etc.
|
||||
config :pleroma, :http,
|
||||
pool_timeout: :timer.seconds(5),
|
||||
pool_timeout: :timer.seconds(60),
|
||||
receive_timeout: :timer.seconds(15),
|
||||
proxy_url: nil,
|
||||
user_agent: :default,
|
||||
pool_size: 10,
|
||||
adapter: [],
|
||||
# see: https://hexdocs.pm/finch/Finch.html#start_link/1
|
||||
pool_max_idle_time: :timer.seconds(30)
|
||||
adapter: []
|
||||
|
||||
config :pleroma, :instance,
|
||||
name: "Akkoma",
|
||||
|
|
|
@ -6,7 +6,7 @@ defmodule Pleroma.HTTP.AdapterHelper do
|
|||
@moduledoc """
|
||||
Configure Tesla.Client with default and customized adapter options.
|
||||
"""
|
||||
@defaults [name: MyFinch, pool_timeout: 5_000, receive_timeout: 5_000]
|
||||
@defaults [name: MyFinch, pool_timeout: 60_000, receive_timeout: 15_000]
|
||||
|
||||
@type proxy_type() :: :socks4 | :socks5
|
||||
@type host() :: charlist() | :inet.ip_address()
|
||||
|
|
|
@ -10,7 +10,7 @@ defmodule Pleroma.HTTP.AdapterHelper.Default do
|
|||
@spec options(keyword(), URI.t()) :: keyword()
|
||||
def options(opts, _uri) do
|
||||
proxy = Pleroma.Config.get([:http, :proxy_url])
|
||||
pool_timeout = Pleroma.Config.get([:http, :pool_timeout], 5000)
|
||||
pool_timeout = Pleroma.Config.get([:http, :pool_timeout], 60_000)
|
||||
receive_timeout = Pleroma.Config.get([:http, :receive_timeout], 15_000)
|
||||
|
||||
opts
|
||||
|
|
|
@ -50,7 +50,7 @@ test "should not override conn_opts if set" do
|
|||
describe "timeout settings" do
|
||||
test "should default to 5000/15000" do
|
||||
options = AdapterHelper.options(%URI{host: ~c"somewhere"})
|
||||
assert options[:pool_timeout] == 5000
|
||||
assert options[:pool_timeout] == 60_000
|
||||
assert options[:receive_timeout] == 15_000
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue