Security News
Opengrep Emerges as Open Source Alternative Amid Semgrep Licensing Controversy
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
promised-retry
Advanced tools
A generic promised based retry mechanism. Useful for eg. ensuring an available database or message queue connection
A generic promised based retry mechanism. Useful for eg. ensuring an available database or message queue connection
yarn add promised-retry
Simple:
const Retry = require('promised-retry')
const { Client } = require('pg')
const retryInstance = new Retry({
try: async () => {
const db = new Client(require('../config').db);
db.on('error', () => {
retryInstance.reset();
if (channels.length) {
retryInstance.try();
}
});
await db.connect();
},
success: db => {
db.on('notification', self.processNotification.bind(self));
channels.forEach(channel => {
db.query('LISTEN ' + channel);
});
},
end: db => { db.end(); }
});
const retryInstance = new Retry(options);
0
.1.2
.retryExponent
, retryExponent
will be used rather than the retry number. Defaults to 33
which means on average max delay of 3m 25s.false
the retries will be aborted.console.log()
.options.retryDelay()
or because the retry instance was ended.npm test
or to watch, install grunt-cli
then do grunt watch
0.5.0 (2022-04-14)
FAQs
A generic promised based retry mechanism. Useful for eg. ensuring an available database or message queue connection
The npm package promised-retry receives a total of 6,654 weekly downloads. As such, promised-retry popularity was classified as popular.
We found that promised-retry demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.