This commit is contained in:
2026-01-20 00:10:41 +01:00
parent 40030863c3
commit fd92604589
2 changed files with 5 additions and 3 deletions

View File

@@ -1,9 +1,8 @@
package lib
import (
"encoding/json" // Added for logging
"encoding/json"
"os"
// Added for path manipulation
)
const cacheFileName = "cache.json" // Renamed for clarity
@@ -57,9 +56,11 @@ func (c *Cache) IsChanged(fetcher string, value string) bool {
if !found {
return true
}
if cachedValue != value {
return true
}
return false
}

View File

@@ -68,6 +68,7 @@ func Runner() {
for {
log.Println("Run updater...")
messages = []string{} // Clear messages for the current iteration
for _, fetcher := range fetchers {
fetcher_messages := fetcher.Fetch()
messages = append(messages, fetcher_messages...)
@@ -80,6 +81,6 @@ func Runner() {
cache.Save()
time.Sleep(100)
time.Sleep(config.Interval)
}
}