scouting: Call ranking scraper
Signed-off-by: Yash Chainani <yashchainani28@gmail.com>
Change-Id: Ife105e949783587c4fb5f74eb77d4c14a1aabe22
diff --git a/scouting/webserver/main.go b/scouting/webserver/main.go
index 8f4298b..5d4ab01 100644
--- a/scouting/webserver/main.go
+++ b/scouting/webserver/main.go
@@ -15,6 +15,7 @@
"github.com/frc971/971-Robot-Code/scouting/db"
"github.com/frc971/971-Robot-Code/scouting/scraping"
+ "github.com/frc971/971-Robot-Code/scouting/webserver/rankings"
"github.com/frc971/971-Robot-Code/scouting/webserver/requests"
"github.com/frc971/971-Robot-Code/scouting/webserver/server"
"github.com/frc971/971-Robot-Code/scouting/webserver/static"
@@ -131,6 +132,9 @@
scoutingServer.Start(*portPtr)
fmt.Println("Serving", *dirPtr, "on port", *portPtr)
+ scraper := rankings.RankingScraper{}
+ scraper.Start(database, 0, "", *blueAllianceConfigPtr)
+
// Block until the user hits Ctrl-C.
sigint := make(chan os.Signal, 1)
signal.Notify(sigint, syscall.SIGINT)
@@ -140,5 +144,6 @@
fmt.Println("Shutting down.")
scoutingServer.Stop()
+ scraper.Stop()
fmt.Println("Successfully shut down.")
}