pull/45/head
HardiReady 2018-09-30 14:44:59 +02:00
parent e1804a9918
commit c2822893ca
2 changed files with 3 additions and 3 deletions

View File

@ -114,7 +114,7 @@ if (process.env.NODE_ENV === config.test.unit.env || process.env.NODE_ENV === co
const mongoServer = new MongodbMemoryServer(); const mongoServer = new MongodbMemoryServer();
mongoose.Promise = Promise; mongoose.Promise = Promise;
mongoServer.getConnectionString().then((mongoUri) => { mongoServer.getConnectionString().then((mongoUri) => {
mongoose.connect(mongoUri, { useNewUrlParser: true }); mongoose.connect(mongoUri, {useNewUrlParser: true});
mongoose.connection.on('error', (e) => { mongoose.connection.on('error', (e) => {
if (e.message.code === 'ETIMEDOUT') { if (e.message.code === 'ETIMEDOUT') {
@ -153,7 +153,7 @@ if (process.env.NODE_ENV === config.test.unit.env || process.env.NODE_ENV === co
} }
logger(`Master ${process.pid} is running. Forking ${numWorkers} workers`); logger(`Master ${process.pid} is running. Forking ${numWorkers} workers`);
//Check if worker id is died // Check if worker id is died
cluster.on('exit', (worker, code, signal) => { cluster.on('exit', (worker, code, signal) => {
logger(`worker ${worker.process.pid} died`); logger(`worker ${worker.process.pid} died`);
}); });

View File

@ -107,7 +107,7 @@ const parseWarLog = (lineArray, war) => {
const target = getPlayerInfoFromString(targetString); const target = getPlayerInfoFromString(targetString);
const kill = { const kill = {
war: war._id, war: war._id,
time: getFullTimeDate(war.date, line.split(WHITESPACE)[5]) time: getFullTimeDate(war.date, line.split(WHITESPACE)[5]),
}; };
if (shooter) { if (shooter) {
kill.shooter = shooter.name; kill.shooter = shooter.name;