Enha: db use same connection to avoid db locking
This commit is contained in:
3
main.go
3
main.go
@ -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()
|
||||
|
Reference in New Issue
Block a user