From 63922b7ea12a5b5386ec03a342f40c649bbdcd74 Mon Sep 17 00:00:00 2001 From: Xevion Date: Tue, 30 Jan 2024 12:47:05 -0600 Subject: [PATCH] Increase general expiry time (1h per 200 classes), decrease priority time (33%) boost --- scrape.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scrape.go b/scrape.go index ed6d970..611930d 100644 --- a/scrape.go +++ b/scrape.go @@ -141,8 +141,8 @@ func ScrapeMajor(subject string) error { } } - // Calculate the expiry time for the scrape (1 hour for every 500 classes, random +-15%) with a minimum of 1 hour - scrapeExpiry := time.Hour * time.Duration(totalClassCount/500) + // Calculate the expiry time for the scrape (1 hour for every 200 classes, random +-15%) with a minimum of 1 hour + scrapeExpiry := time.Hour * time.Duration(totalClassCount/200) partial := scrapeExpiry.Seconds() * 0.15 if rand.Intn(2) == 0 { scrapeExpiry -= time.Duration(partial) * time.Second @@ -157,7 +157,7 @@ func ScrapeMajor(subject string) error { // If the subject is a priority, then the expiry is halved if lo.Contains(PriorityMajors, subject) { - scrapeExpiry /= 2 + scrapeExpiry /= 3 } // Mark the major as scraped