mirror of
https://github.com/nprasad2077/NBA_Go.git
synced 2026-09-22 05:55:13 +00:00
Increase sleep duration in box score scraping
This commit is contained in:
@@ -136,7 +136,7 @@ func scrapeAndParseWorker(id int, jobs <-chan models.Game, results chan<- Scrape
|
|||||||
fullURL := boxScoreURLBase + game.BoxScoreURL
|
fullURL := boxScoreURLBase + game.BoxScoreURL
|
||||||
|
|
||||||
utils.SleepWithJitter(baseDelay)
|
utils.SleepWithJitter(baseDelay)
|
||||||
time.Sleep(1500 * time.Millisecond)
|
time.Sleep(2500 * time.Millisecond)
|
||||||
|
|
||||||
req, err := http.NewRequest("GET", fullURL, nil)
|
req, err := http.NewRequest("GET", fullURL, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -422,4 +422,4 @@ func batchUpsertAll(db *gorm.DB, pbs []models.PlayerGameBasicStat, pas []models.
|
|||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user