mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 00:39:13 +00:00
feat(confg): reload on save and refactor logging (#275)
* feat(confg): reload on save * refactor(logging): rework
This commit is contained in:
parent
198528a474
commit
91b094f4f4
56 changed files with 995 additions and 873 deletions
|
@ -7,6 +7,7 @@ import (
|
|||
|
||||
"github.com/autobrr/autobrr/internal/domain"
|
||||
"github.com/autobrr/autobrr/internal/download_client"
|
||||
"github.com/autobrr/autobrr/internal/logger"
|
||||
)
|
||||
|
||||
type Service interface {
|
||||
|
@ -22,13 +23,19 @@ type Service interface {
|
|||
}
|
||||
|
||||
type service struct {
|
||||
log logger.Logger
|
||||
repo domain.ActionRepo
|
||||
clientSvc download_client.Service
|
||||
bus EventBus.Bus
|
||||
}
|
||||
|
||||
func NewService(repo domain.ActionRepo, clientSvc download_client.Service, bus EventBus.Bus) Service {
|
||||
return &service{repo: repo, clientSvc: clientSvc, bus: bus}
|
||||
func NewService(log logger.Logger, repo domain.ActionRepo, clientSvc download_client.Service, bus EventBus.Bus) Service {
|
||||
return &service{
|
||||
log: log,
|
||||
repo: repo,
|
||||
clientSvc: clientSvc,
|
||||
bus: bus,
|
||||
}
|
||||
}
|
||||
|
||||
func (s *service) Store(ctx context.Context, action domain.Action) (*domain.Action, error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue