tune update db

This commit is contained in:
thuanle
2024-08-05 15:06:39 +07:00
parent 71ceabdf00
commit f33d064d6e
8 changed files with 128 additions and 9 deletions

View File

@@ -6,6 +6,7 @@ import (
"github.com/rs/zerolog/log"
"os"
"os/signal"
"thuanle.me/ip-info/internal/data"
"thuanle.me/ip-info/internal/services/api"
"thuanle.me/ip-info/internal/services/db_updater"
"time"
@@ -21,6 +22,11 @@ func main() {
log.Err(err).Msg("Error loading .env file")
}
err = data.CleanTempFiles()
if err != nil {
log.Err(err).Msg("Failed to clean temp files")
}
stop := make(chan os.Signal, 1)
signal.Notify(stop, os.Interrupt)