tomfrost / node-attempt Goto Github PK
View Code? Open in Web Editor NEWAutomatically retry functions that fail, in crazily customizable ways.
Automatically retry functions that fail, in crazily customizable ways.
On https://www.npmjs.com/package/attempt it shows Default: 5. The number of times to retry
.
On https://github.com/TomFrost/node-attempt it shows Default: 2. The number of times to retry
.
I don't want to retry every error. So maybe onError
should get a third parameter that could be used like
onError: function(err, done, abort) {
if (err.code === 'ECONNREFUSED') {
done(true);
} else {
abort();
}
}
Looks interesting and useful, but have you or anyone else ever used it in production?
Please update the documentation to make it obvious that this
should be used as a callback. It's not explicitly mentioned anywhere.
This may be a feature request.
I wanted to know if I can somehow provide a timeout value in config, so if the function does not return in 'x' seconds (= timeout value), then it should be considered a failure.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.