Add more post processing tasks (points)
This commit is contained in:
parent
882b38439e
commit
808949ac0c
|
@ -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]}`)
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user