This is Говнокод
nook-scheel opened this issue · comments
Nook Scheel commented
Lines 58 to 85 in 16eb60b
This is not Говнокод
mongoose.connect = async (uri = mongoose.config.mongo.uri, options = mongoose.config.mongo.options) => {
try {
await mongoose._connect(uri, options);
// output debug info
mongoose.config.logger.debug('mongo connected');
return;
} catch (err) {
mongoose.config._connectionAttempts++;
if (
mongoose.config._connectionAttempts >=
mongoose.config.mongo.options.reconnectTries
) {
throw err;
}
mongoose.config.logger.warn(
`attempting to reconnect to mongo in ${
mongoose.config.mongo.options.reconnectInterval
} ms with ${mongoose.config.mongo.options.reconnectTries -
mongoose.config._connectionAttempts} retries remaining`
);
await delay(mongoose.config.mongo.options.reconnectInterval);
return mongoose.connect();
}
};
niftylettuce commented
Can you please translate in English?