mirror of
https://github.com/nprasad2077/NBA_Go.git
synced 2026-09-23 06:25:14 +00:00
advanced models/controllers/service docs update
This commit is contained in:
@@ -11,7 +11,18 @@ import (
|
||||
// importPlayerAdvanced fetches and stores advanced stats for seasons 2023–2025
|
||||
func importPlayerAdvanced(db *gorm.DB) {
|
||||
for season := 2023; season <= 2025; season++ {
|
||||
if err := services.FetchAndStorePlayerAdvancedStats(db, season); err != nil {
|
||||
if err := services.FetchAndStorePlayerAdvancedStats(db, season, false); err != nil {
|
||||
log.Printf("advanced import failed for %d: %v", season, err)
|
||||
}
|
||||
time.Sleep(1100 * time.Millisecond)
|
||||
}
|
||||
}
|
||||
|
||||
// importPlayerAdvancedPlayoffs fetches and stores advanced stats for playoffs seasons 2023–2025
|
||||
|
||||
func importPlayerAdvancedPlayoffs (db *gorm.DB) {
|
||||
for season := 2023; season <= 2024; season++ {
|
||||
if err := services.FetchAndStorePlayerAdvancedPlayoffsStats(db, season, true); err != nil {
|
||||
log.Printf("advanced import failed for %d: %v", season, err)
|
||||
}
|
||||
time.Sleep(1100 * time.Millisecond)
|
||||
|
||||
Reference in New Issue
Block a user