Turned on --nojournal for mongod

This commit is contained in:
DallonF
2012-06-15 10:48:53 -07:00
parent 1db6ec8604
commit 5aa63de14d

View File

@@ -12,6 +12,7 @@ exports.restart = function (mongod, fn) {
debug('starting %s', mongod);
try {
fs.unlinkSync('./data/mongod.lock');
pid = JSON.parse(fs.readFileSync('./.dpd/pids/mongod'));
if(pid) {
@@ -21,8 +22,11 @@ exports.restart = function (mongod, fn) {
debug('no pid found');
}
} catch(e) {}
var options = ['--dbpath', './data', '--pidfilepath', './.dpd/pids/mongod'];
options.push('--nojournal'); //TODO: Only in dev mode!
var proc = spawn(mongod, ['--dbpath', './data', '--pidfilepath', './.dpd/pids/mongod'], {title: 'FOOBAR'})
var proc = spawn(mongod, options, {title: 'FOOBAR'})
, buf = '';
proc.stdout.on('data', function(data) {
buf += data;