Closed rmosolgo closed 8 years ago
You can perform some work or instantiate the first resource in a Rails initializer but there's no easy way to make a connection pool eager load its resources. Do you mean that all 10 elements require a long setup to create? If so, I'm not sure there's any easy solution to your problem.
Fair 'nuf, I think one would be enough. (Basically, for production, I'd rather raise errors at startup instead of randomly at runtime whenever the pool gets hit.)
Thanks!
Hi, thanks for the great gem! We use it in
react-rails
for server rendering.Let's say my pool is:
And later I'm going to need 10 of those. Is there a way I can do the
really_long_setup
ahead of time?I thought maybe
but I would expect that to use the same member each time. (Also, I'm not sure how I could tell if the pool was initialized or not.)