Enha: db use same connection to avoid db locking

This commit is contained in:
Grail Finder
2025-07-06 13:20:28 +03:00
parent e84941d593
commit 357f42c354
5 changed files with 27 additions and 15 deletions

View File

@ -62,7 +62,8 @@ func main() {
// Setup graceful shutdown
stop := make(chan os.Signal, 1)
signal.Notify(stop, os.Interrupt, syscall.SIGTERM)
repo := repos.NewRepoProvider(cfg.DBPath)
// repo := repos.NewRepoProvider(cfg.DBPath)
repo := repos.RP
defer repo.Close()
cm := crons.NewCronManager(repo, slog.Default())
cm.Start()