From 529e53cb314a080770b3c3762080d5a5619d15c1 Mon Sep 17 00:00:00 2001 From: Ravi Prasad Date: Thu, 17 Jul 2025 00:44:02 -0500 Subject: [PATCH] service workers adjust --- import.go | 6 +++--- services/box_score_scrape_service.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/import.go b/import.go index 45b0e55..a38dd60 100644 --- a/import.go +++ b/import.go @@ -67,7 +67,7 @@ func importGameSchedules(db *gorm.DB) { // "february", "march", "april", "may", "june", } - for season := 2018; season <= 2025; season++ { + for season := 2025; season <= 2025; season++ { log.Printf("--- Starting Game Schedule Import for Season: %d ---", season) for _, month := range months { // The service will print a warning and skip if a month has no data (e.g. May/June for a season not yet finished) @@ -89,8 +89,8 @@ func importGameSchedules(db *gorm.DB) { func importBoxScores(db *gorm.DB) { // Define the date range for the 2023-2024 NBA season. // The regular season typically starts in October and playoffs end in June. - from := time.Date(2023, time.October, 1, 0, 0, 0, 0, time.UTC) - to := time.Date(2024, time.July, 1, 0, 0, 0, 0, time.UTC) + from := time.Date(2022, time.October, 1, 0, 0, 0, 0, time.UTC) + to := time.Date(2023, time.July, 1, 0, 0, 0, 0, time.UTC) log.Printf("--- Starting Box Score Data Import for the 2023-2024 Season ---") diff --git a/services/box_score_scrape_service.go b/services/box_score_scrape_service.go index 98ee511..67be818 100644 --- a/services/box_score_scrape_service.go +++ b/services/box_score_scrape_service.go @@ -16,7 +16,7 @@ import ( ) const boxScoreURLBase = "https://www.basketball-reference.com" -const numWorkers = 8 // Number of concurrent scrapers. Adjust based on your machine and network. +const numWorkers = 5 // Number of concurrent scrapers. Adjust based on your machine and network. // ScrapedResult holds all the parsed stats from a single game. type ScrapedResult struct {