From 808949ac0c8227285d0351677d1609cfdc855982 Mon Sep 17 00:00:00 2001 From: furo Date: Sat, 9 Oct 2021 23:25:57 +0200 Subject: [PATCH] Add more post processing tasks (points) --- libs/database/sqlite2mongo/postTasks.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/database/sqlite2mongo/postTasks.js b/libs/database/sqlite2mongo/postTasks.js index 891ac2e..b482a83 100644 --- a/libs/database/sqlite2mongo/postTasks.js +++ b/libs/database/sqlite2mongo/postTasks.js @@ -14,7 +14,7 @@ export default async function postTasks() { log("Loading cached info from DDNet...") const cache = decodeMsgpack() -/* + log("Adding total amounts of finishes to maps!") for (const category in cache.maps) { for (const i in cache.maps[category]) { @@ -61,7 +61,7 @@ export default async function postTasks() { log(`Processed ${entry[1]} team points for ${entry[0]}`) } -*/ + log("Adding weekly points to players") for (const entry of cache.pointsThisWeek) { const playerFromDB = await Player.findOne({ name: entry[0] }) @@ -81,6 +81,6 @@ export default async function postTasks() { playerFromDB.pointsThisMonth = entry[1] playerFromDB.save() - log(`Processed ${entry[1]} team points for ${entry[0]}`) + log(`Processed ${entry[1]} monthly points for ${entry[0]}`) } } \ No newline at end of file