瀏覽代碼

Fix gun_pool_options deprecation warning message

maint/niou-curses
Mark Felder 3 年之前
父節點
當前提交
e2dcf039d2
共有 2 個檔案被更改,包括 2 行新增2 行删除
  1. +1
    -1
      lib/pleroma/config/deprecation_warnings.ex
  2. +1
    -1
      test/config/deprecation_warnings_test.exs

+ 1
- 1
lib/pleroma/config/deprecation_warnings.ex 查看文件

@@ -122,7 +122,7 @@ defmodule Pleroma.Config.DeprecationWarnings do
if timeout = pool_config[:await_up_timeout] do
Logger.warn("""
!!!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))


+ 1
- 1
test/config/deprecation_warnings_test.exs 查看文件

@@ -74,7 +74,7 @@ defmodule Pleroma.Config.DeprecationWarningsTest do
assert capture_log(fn ->
DeprecationWarnings.check_gun_pool_options()
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

test "pool timeout" do


Loading…
取消
儲存