feat(retry-on-timeout): Implement retry on timeout when creating new client#3491
feat(retry-on-timeout): Implement retry on timeout when creating new client#3491MathieuGuillet wants to merge 4 commits intobrianc:masterfrom
Conversation
Add new options and instructions to implement retry on timeout when the pool tries to create new client in the pool. This will avoid to throw an error on the first timeout error if it can be recover in a given time.
|
I think library users should be able to achieve this by calling the relevant pool function repeatedly as long as it returns a specific type of error (which might be different types of errors according to different needs). You can write a module for that. |
I understand your suggestion, but we are using an ORM (TypeORM) and it does not allow to trick that point easily (we have to change the driver to achieve what you suggest). What do you think @charmander ? Can I re-open this PR and improve the behavior as explained? |
Add new options and instructions to implement retries on timeout when the pool tries to create new client in the pool.
This will avoid to throw an error on the first timeout error if it can be recover in a given time.