Fix gun_pool_options deprecation warning message

This commit is contained in:
Mark Felder 2020-09-22 11:15:40 -05:00
parent 2fc3b46ee7
commit e2dcf039d2
2 changed files with 2 additions and 2 deletions

View File

@ -122,7 +122,7 @@ defmodule Pleroma.Config.DeprecationWarnings do
if timeout = pool_config[:await_up_timeout] do if timeout = pool_config[:await_up_timeout] do
Logger.warn(""" Logger.warn("""
!!!DEPRECATION WARNING!!! !!!DEPRECATION WARNING!!!
Your config is using old setting name `await_up_timeout` instead of `connect_timeout`. Setting should work for now, but you are advised to change format to scheme with port to prevent possible issues later. Your config is using old setting `config :pleroma, :connections_pool, await_up_timeout`. Please change to `config :pleroma, :connections_pool, connect_timeout` to ensure compatibility with future releases.
""") """)
Config.put(:connections_pool, Keyword.put_new(pool_config, :connect_timeout, timeout)) Config.put(:connections_pool, Keyword.put_new(pool_config, :connect_timeout, timeout))

View File

@ -74,7 +74,7 @@ defmodule Pleroma.Config.DeprecationWarningsTest do
assert capture_log(fn -> assert capture_log(fn ->
DeprecationWarnings.check_gun_pool_options() DeprecationWarnings.check_gun_pool_options()
end) =~ end) =~
"Your config is using old setting name `await_up_timeout` instead of `connect_timeout`" "Your config is using old setting `config :pleroma, :connections_pool, await_up_timeout`."
end end
test "pool timeout" do test "pool timeout" do