fix font family and bugs, better docs
This commit is contained in:
7
main.go
7
main.go
@@ -135,7 +135,7 @@ func NewUptimeManager() *UptimeManager {
|
||||
|
||||
updateInterval, err := strconv.Atoi(os.Getenv("UPTIMEROBOT_UPDATE_INTERVAL"))
|
||||
if err != nil || updateInterval < 1 {
|
||||
updateInterval = 5
|
||||
updateInterval = 300
|
||||
}
|
||||
|
||||
uptimeManager := &UptimeManager{
|
||||
@@ -159,7 +159,7 @@ func (u *UptimeManager) getUptime() []UptimeRobotSite {
|
||||
}
|
||||
|
||||
func (u *UptimeManager) updateWorker() {
|
||||
ticker := time.NewTicker(time.Duration(u.updateInterval) * time.Minute)
|
||||
ticker := time.NewTicker(time.Duration(u.updateInterval) * time.Second)
|
||||
defer ticker.Stop()
|
||||
|
||||
for {
|
||||
@@ -196,8 +196,6 @@ func (u *UptimeManager) update() {
|
||||
return
|
||||
}
|
||||
|
||||
fmt.Printf("%+v", monitors.Monitors)
|
||||
|
||||
u.mutex.Lock()
|
||||
u.sites = monitors.Monitors
|
||||
u.lastUpdate = time.Now()
|
||||
@@ -675,7 +673,6 @@ func main() {
|
||||
}
|
||||
|
||||
if os.Getenv("PASSPORT_ENABLE_UPTIME") != "false" {
|
||||
fmt.Printf("%+v", app.UptimeManager.getUptime())
|
||||
renderData["UptimeData"] = app.UptimeManager.getUptime()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user