add Metric
Build Docker Image / build (arm64) (push) Successful in 54s
Build Docker Image / build (amd64) (push) Successful in 2m13s
Build Docker Image / amend-manifest (push) Successful in 5s

This commit is contained in:
thuanle committed 2024-11-07 09:08:19 +07:00
1 parent b0ac68cbdb
commit 108458682e
5 files changed
+91 -1

No files matched your search

+5
View File
@@ -5,8 +5,11 @@ import (
"github.com/rs/zerolog/log"
"thuanle.me/ip-info/configs"
"thuanle.me/ip-info/internal/data"
"time"
)
var DbUpdatedAt time.Time
func StartUpdateDbService() {
c := cron.New()
_, _ = c.AddFunc("@daily", fetchDbs)
@@ -29,5 +32,7 @@ func fetchDbs() {
log.Err(err).Msg("Failed to reload mmdb")
return
}
DbUpdatedAt = time.Now()
}
}