speed update, new table for cached stats
This commit is contained in:
25
Sources/App/Commands/RecalulateRecords.swift
Normal file
25
Sources/App/Commands/RecalulateRecords.swift
Normal 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)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user