resilient.js
resilient.js copied to clipboard
Allow to override retries option on resilient#send and rest of methods.
I've come across certain use cases where I would like to override the number of retries, configured in the client, on very specific requests, like in the following example, without having to create a new client instance:
client.send(path, {retry: 0, ...}, callback);
If this is currently possible, I didn't manage to get it right ... would this be a reasonable feature to add to resilient.js?
Yes, it can be achieved easily. Send method can support vadiadic arguments and infer them based of their type.
@ismriv are you able to provide a PR? Otherwise I can support it in a near future.
Sure, I'll try to provide a PR by the end of the week.