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
We recently had some issues regarding the pooling functionality, and the documentation seemed a bit confusing.
From the code it looks like the behaviour is as follows:
When using {pool, default} tuple => the default pool will be used.
When not passing any pool tuple, the use_default_pool environment key is checked. If true, the default pool is used, if not, it does not use the pool.
So this statement from the readme
By default all connections are created and closed dynamically by hackney but sometimes you may want to reuse the same reference for your connections. It's especially useful if you just want to handle serially a couple of requests.
Seems a bit off, since the only way to dynamically create/close connections would be to not pass any pool option and switching off the default pool using the environment key.
By default it would use the default pool, which totally makes sense.
Also this:
Note:
Sometimes you want to disable the default pool in your app without having to set the client option each time. You can now do this by setting the hackney application environment key use_default_pool to false.
is a bit confusing because there is no way to switch off the default pool using a client option.
If my observations are correct, I would be happy to provide a PR for the README.
The text was updated successfully, but these errors were encountered:
markmeeus
changed the title
Document about default pool is somewhat confusing
Documentation about default pool is somewhat confusing
May 29, 2018
Hi There,
We recently had some issues regarding the pooling functionality, and the documentation seemed a bit confusing.
From the code it looks like the behaviour is as follows:
When using {pool, default} tuple => the default pool will be used.
When not passing any pool tuple, the use_default_pool environment key is checked. If true, the default pool is used, if not, it does not use the pool.
So this statement from the readme
Seems a bit off, since the only way to dynamically create/close connections would be to not pass any pool option and switching off the default pool using the environment key.
By default it would use the default pool, which totally makes sense.
Also this:
Note:
is a bit confusing because there is no way to switch off the default pool using a client option.
If my observations are correct, I would be happy to provide a PR for the README.
The text was updated successfully, but these errors were encountered: