playoffs service fixed

This commit is contained in:
Ravi Prasad
2025-05-08 18:47:02 -05:00
parent edb2cfb863
commit 992ec88a41
2 changed files with 64 additions and 0 deletions
+12
View File
@@ -91,6 +91,18 @@ func main() {
log.Printf("player totals Import Success")
}()
go func() {
for season := 2023; season <= 2024; season++ {
if err := services.FetchAndStorePlayerTotalPlayoffsStats(db, season, true); err != nil {
log.Printf("Fetch failed for player totals Playoffs season %d: %v\n", season, err)
} else {
log.Printf("Fetch successful for player totals Playoffs season %d\n", season)
}
time.Sleep(1500 * time.Millisecond) // optional delay
}
log.Printf("player totals Playoffs Import Success")
}()
/* ---------- START & SHUTDOWN ---------- */
go func() {
if err := app.Listen(":5000"); err != nil && !errors.Is(err, http.ErrServerClosed) {