Anime lists didn't age well 😵‍💫

This commit is contained in:
daru
2022-08-25 23:31:18 +02:00
parent dbd34abea1
commit 730f91e74e
6 changed files with 48 additions and 42 deletions

View File

@@ -67,6 +67,7 @@ var (
logOut *RingBuf
buildTime string
buildCommit string
lastAnnounce *SomewhatThreadSafeTime
)
func main() {
@@ -107,7 +108,7 @@ func main() {
log.Fatal(err)
}
defer searchCache.Close()
animeListCache, err = bigcache.NewBigCache(bigcache.DefaultConfig(24 * time.Minute))
animeListCache, err = bigcache.NewBigCache(bigcache.DefaultConfig(15 * time.Minute))
if err != nil {
log.Fatal(err)
}
@@ -126,6 +127,10 @@ func main() {
}
defer db.Close()
lastAnnounce = &SomewhatThreadSafeTime{
stamp: time.Now().Add(-1 * time.Hour),
}
color.Infoln("NutsDB connected")
logOut.WriteLine("🗃️ NutsDB connected")