Skip to content

Commit 645ec64

Browse files
committed
Label the connection with the repo name
See elixir-ecto/db_connection#332
1 parent a703c2e commit 645ec64

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/ecto/adapters/sql.ex

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -890,7 +890,10 @@ defmodule Ecto.Adapters.SQL do
890890
{name, config} = Keyword.pop(config, :name, config[:repo])
891891
{pool_count, config} = Keyword.pop(config, :pool_count, 1)
892892
{pool, config} = pool_config(config)
893-
child_spec = connection.child_spec(config)
893+
894+
connection_config = Keyword.put(config, :label, name)
895+
896+
child_spec = connection.child_spec(connection_config)
894897

895898
meta = %{
896899
telemetry: telemetry,

0 commit comments

Comments
 (0)