fix font family and bugs, better docs

This commit is contained in:
Zoe
2025-04-03 19:49:16 +00:00
parent 8765f6cb57
commit 8eb4355ae3
4 changed files with 24 additions and 12 deletions

View File

@@ -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()
}