chore: full removal of recurring deposits
This commit is contained in:
parent
f05c36e44f
commit
b092d12c57
5 changed files with 8 additions and 42 deletions
|
|
@ -9,16 +9,14 @@ import (
|
|||
)
|
||||
|
||||
type Scheduler struct {
|
||||
recurringService *service.RecurringExpenseService
|
||||
recurringDepositService *service.RecurringDepositService
|
||||
interval time.Duration
|
||||
recurringService *service.RecurringExpenseService
|
||||
interval time.Duration
|
||||
}
|
||||
|
||||
func New(recurringService *service.RecurringExpenseService, recurringDepositService *service.RecurringDepositService) *Scheduler {
|
||||
func New(recurringService *service.RecurringExpenseService) *Scheduler {
|
||||
return &Scheduler{
|
||||
recurringService: recurringService,
|
||||
recurringDepositService: recurringDepositService,
|
||||
interval: 1 * time.Hour,
|
||||
recurringService: recurringService,
|
||||
interval: 1 * time.Hour,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -47,9 +45,4 @@ func (s *Scheduler) run() {
|
|||
if err := s.recurringService.ProcessDueRecurrences(now); err != nil {
|
||||
slog.Error("scheduler: failed to process recurring expenses", "error", err)
|
||||
}
|
||||
|
||||
slog.Info("scheduler: processing due recurring deposits")
|
||||
if err := s.recurringDepositService.ProcessDueRecurrences(now); err != nil {
|
||||
slog.Error("scheduler: failed to process recurring deposits", "error", err)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue