You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have generated 5 migration files using stub generator. while executing the migration directory using migrator.runFromDir while running files it throw this error "Unhandled rejection MongoError: server instance pool was destroyed" for all the files.
there is my code...
var mm = require('mongodb-migrations');
var path = require('path');
var dir = path.join(__dirname, '1.3.5');
var config = require('./mm-config.json'),
mongo=require('mongoose'),
var migrator = new mm.Migrator(config, customLogFn);
I have generated 5 migration files using stub generator. while executing the migration directory using migrator.runFromDir while running files it throw this error "Unhandled rejection MongoError: server instance pool was destroyed" for all the files.
there is my code...
var mm = require('mongodb-migrations');
var path = require('path');
var dir = path.join(__dirname, '1.3.5');
var config = require('./mm-config.json'),
mongo=require('mongoose'),
var migrator = new mm.Migrator(config, customLogFn);
migrator.runFromDir(dir, doneFn, progressFn);
migrator.migrate(doneFn, progressFn);
migrator.dispose(cb);
function cb(error) {
customLogFn("system", "AFTER_DISPOSE ERROR: " + error);
}
function customLogFn(level, message) {
console.log(message);
}
function doneFn(error, results) {
console.log(results}
function progressFn(id, result) {
console.log("MIGRATOR_FILE:", id, result);
}
Please help me out
Thank you.
The text was updated successfully, but these errors were encountered: