Fix: Performance issues and sqlite locking (#74)

* fix: performance issues and sqlite locking

* fix: dashboard release stats was reversed

* refactor: open and migrate db

* chore: cleanup
This commit is contained in:
Ludvig Lundgren 2022-01-11 19:35:27 +01:00 committed by GitHub
parent d8c37dde2f
commit f466657ed4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 362 additions and 658 deletions

View file

@ -1,6 +1,7 @@
package action
import (
"context"
"time"
"github.com/autobrr/autobrr/internal/domain"
@ -15,7 +16,7 @@ func (s *service) lidarr(release domain.Release, action domain.Action) error {
// TODO validate data
// get client for action
client, err := s.clientSvc.FindByID(action.ClientID)
client, err := s.clientSvc.FindByID(context.TODO(), action.ClientID)
if err != nil {
log.Error().Err(err).Msgf("error finding client: %v", action.ClientID)
return err