use existing method for war end date; extend backup output
parent
b8ca870d8e
commit
1b66ae83a5
|
@ -129,7 +129,6 @@ if (process.env.NODE_ENV !== config.test.env) {
|
|||
useMongoClient: true
|
||||
});
|
||||
mongoosePromise.then((db) => {
|
||||
process.env.TZ = 'Europe/Berlin';
|
||||
app.listen(config.test.port);
|
||||
console.log('Listening on port ' + config.test.port);
|
||||
})
|
||||
|
|
|
@ -62,7 +62,7 @@ const parseWarLog = (lineArray, war) => {
|
|||
if (line.includes('Endbudget')) {
|
||||
stats.war['endBudgetBlufor'] = transformMoneyString(budg[11]);
|
||||
stats.war['endBudgetOpfor'] = transformMoneyString(budg[14]);
|
||||
stats.war.endDate = new Date(budg[0].substr(0, budg[0].length - 1).split('/').join('-') + 'T0' + budg[5]);
|
||||
stats.war.endDate = getFullTimeDate(war.date, budg[5]);
|
||||
} else if (line.includes('Startbudget')) {
|
||||
stats.war['budgetBlufor'] = transformMoneyString(budg[11]);
|
||||
stats.war['budgetOpfor'] = transformMoneyString(budg[14]);
|
||||
|
|
|
@ -23,6 +23,7 @@ do
|
|||
# provide date for restore process, if data import is needed
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
echo "table ${i}"
|
||||
mongoexport --db cc --collection $i --out ${DATE}/collections/${i}.json;
|
||||
else
|
||||
mongoimport --db cc --collection $i --drop --file ${1}/collections/${i}.json
|
||||
|
|
Loading…
Reference in New Issue