mirror of
https://github.com/zhigang1992/deployd.git
synced 2026-05-13 12:37:17 +08:00
Turned on --nojournal for mongod
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user