Skip to content

Conversation

yordis
Copy link

@yordis yordis commented Oct 8, 2025

Hey team, thank you so much for package, we are trying to adopt and we found that we needed to call Application.get_env/2 in the application.

This PR adds support for loading pool configuration from Application.get_env/3 when using the module-based pool pattern. Added the :otp_app option to the __using__ macro, allowing pools to load their configuration from application environment:

defmodule MyApp.MyPool do
  use ConnGRPC.Pool, otp_app: :my_app
end

Configuration can then be set in runtime.exs:

config :my_app, MyApp.MyPool,
  pool_size: 5,
  channel: [address: System.get_env("MY_APP_MY_POOL_ADDRESS"]

Useful to configure things from runtime.ex without the developers having to come up with that many ways to configure the pools

@yordis yordis force-pushed the yordis/feat-allow-app-env branch 3 times, most recently from ce2d3d3 to b1fa890 Compare October 8, 2025 23:16
@yordis yordis force-pushed the yordis/feat-allow-app-env branch from b1fa890 to 80d18ab Compare October 8, 2025 23:23
@yordis yordis marked this pull request as ready for review October 8, 2025 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant