Skip to content

Commit

Permalink
docs: Updating log to be more accurate
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Boutour <[email protected]>
  • Loading branch information
ViBiOh committed Jan 5, 2022
1 parent b4ede3b commit 8ad2134
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/notifier/notifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,16 +142,17 @@ func (a App) getKetchupToNotify(ctx context.Context, releases []model.Release) (
return nil, fmt.Errorf("unable to get ketchups for repositories: %w", err)
}

logger.Info("%d daily ketchups updates", len(ketchups))

userToNotify := a.syncReleasesByUser(releases, ketchups)
logger.Info("%d daily ketchups to notify", len(ketchups))

if a.clock.Now().Weekday() == time.Monday {
weeklyKetchups, err := a.ketchupService.ListOutdatedByFrequency(ctx, model.Weekly)
if err != nil {
return nil, fmt.Errorf("unable to get weekly ketchups: %w", err)
}

logger.Info("%d weekly ketchups to notify", len(weeklyKetchups))
logger.Info("%d weekly ketchups updates", len(weeklyKetchups))
a.appendKetchupsToUser(userToNotify, weeklyKetchups)
}

Expand Down

0 comments on commit 8ad2134

Please sign in to comment.