speed update, new table for cached stats

This commit is contained in:
Michael Simard
2021-08-04 16:32:17 -05:00
parent c38b621bdd
commit bc0dc93e9e
11 changed files with 485 additions and 139 deletions

View File

@@ -0,0 +1,25 @@
//
// RecalculateStatistics.swift
// RecalculateStatistics
//
// Created by Michael Simard on 8/3/21.
//
import Vapor
import Fluent
struct RecalulateRecords: Command {
struct Signature: CommandSignature {
}
var help: String {
"Recaluclates all stats with a w/l ratio"
}
func run(using context: CommandContext, signature: Signature) throws {
DBHelpers.relcalulateRecords(db: context.application.db) { message in
context.console.print(message)
}
}
}