meanio
meanio copied to clipboard
Implement a retry capability when connecting to MongoDB
This allows configuration of a retry loop when connecting to Mongo. You can configure as follows:
module.exports = {
db: 'mongodb://' + (process.env.DB_PORT_27017_TCP_ADDR || 'localhost') + '/mean-dev',
dbOptions: {
retry: {
times: 5,
interval: 1000
}
},
...
Options are per async.retry (interval is in ms). Default behavior is to not retry (i.e. current behavior).
This is a nice addition, thanks!