You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My application create a pool at startup to connect to one API and right now this API is down so my application can't start. I don't really need the API to be up when I start my application, only when I get a request for it.
Is there a way to do that?
The text was updated successfully, but these errors were encountered:
initialization_fail_fast(false) works and if I use min_idle(Some(0)) my application will only try to connect if needed. Nice.
If r2d2 is not able to connect, pool.get() will return an error but will still try to connect. It seems to ignore the min_idle set to 0. Is it normal behavior?
I'm not sure it's explicitly intentional, more that it falls out from the implementation and generally feels like a reasonable thing to do - if you're trying to get a connection now, you'll probably be trying to get a connection again in the future.
My application create a pool at startup to connect to one API and right now this API is down so my application can't start. I don't really need the API to be up when I start my application, only when I get a request for it.
Is there a way to do that?
The text was updated successfully, but these errors were encountered: