Make the scouting background scraper more generic
We're already using the code for more than just scraping The Blue
Alliance. I'd like to expand it to even more use cases. This patch
moves the code into a more appropriate directory and changes the
module name correspondingly.
Signed-off-by: Philipp Schrader <philipp.schrader@gmail.com>
Change-Id: Ic0288231f9c0d12f682eb75ac265f090d1ce9165
diff --git a/scouting/webserver/main.go b/scouting/webserver/main.go
index 1b5a002..ba9d120 100644
--- a/scouting/webserver/main.go
+++ b/scouting/webserver/main.go
@@ -14,8 +14,8 @@
"syscall"
"time"
+ "github.com/frc971/971-Robot-Code/scouting/background_task"
"github.com/frc971/971-Robot-Code/scouting/db"
- "github.com/frc971/971-Robot-Code/scouting/scraping/background"
"github.com/frc971/971-Robot-Code/scouting/webserver/driver_ranking"
"github.com/frc971/971-Robot-Code/scouting/webserver/match_list"
"github.com/frc971/971-Robot-Code/scouting/webserver/rankings"
@@ -141,17 +141,17 @@
// Since Go doesn't support default arguments, we use 0 and "" to
// indicate that we want to source the values from the config.
- matchListScraper := background.BackgroundScraper{}
+ matchListScraper := background_task.BackgroundTask{}
matchListScraper.Start(func() {
match_list.GetMatchList(database, 0, "", *blueAllianceConfigPtr)
})
- rankingsScraper := background.BackgroundScraper{}
+ rankingsScraper := background_task.BackgroundTask{}
rankingsScraper.Start(func() {
rankings.GetRankings(database, 0, "", *blueAllianceConfigPtr)
})
- driverRankingParser := background.BackgroundScraper{}
+ driverRankingParser := background_task.BackgroundTask{}
driverRankingParser.Start(func() {
// Specify "" as the script path here so that the default is
// used.