remove debug logs and panic if auto refresh failed
This commit is contained in:
parent
1fd0ecc167
commit
8bf2e7b687
7
main.go
7
main.go
@ -50,7 +50,11 @@ func main() {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
go api.AutoRefresh(context.Background())
|
||||
go func() {
|
||||
if err := api.AutoRefresh(context.Background()); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}()
|
||||
|
||||
go func() {
|
||||
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
||||
@ -71,7 +75,6 @@ func main() {
|
||||
lastTick := time.Now()
|
||||
for now := range ticker.C {
|
||||
CurrentTraffic = CalculateSiteTraffic(api, sites, now.Sub(lastTick))
|
||||
fmt.Println(CurrentTraffic)
|
||||
lastTick = now
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user