Reliable way to get the PID of a Ecto repo

If it’s already running under a supervisor known to you, you can use Supervisor.which_children/1 by finding the child with the module which starts the process.

For an example look for MyApp.Application.find_server/0 in:

1 Like