resilient.js icon indicating copy to clipboard operation
resilient.js copied to clipboard

Allow to override retries option on resilient#send and rest of methods.

Open ismriv opened this issue 8 years ago • 3 comments

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?

ismriv avatar May 28 '16 14:05 ismriv

Yes, it can be achieved easily. Send method can support vadiadic arguments and infer them based of their type.

h2non avatar May 28 '16 15:05 h2non

@ismriv are you able to provide a PR? Otherwise I can support it in a near future.

h2non avatar May 28 '16 16:05 h2non

Sure, I'll try to provide a PR by the end of the week.

ismriv avatar May 30 '16 08:05 ismriv