diff options
| author | Paul Buetow <paul@buetow.org> | 2024-11-04 23:17:50 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2024-11-04 23:17:50 +0200 |
| commit | c3f0011ec9f09ba5481b54ba7edbc71cdd8ff33f (patch) | |
| tree | 98935b3d030c4dc0d5c49be94857c8355cb8e1a7 /internal/schedule/schedule.go | |
| parent | 5c557a08db23b01e5a953f0503db1f705de666fa (diff) | |
increase rate when there are soo posts scheduled
Diffstat (limited to 'internal/schedule/schedule.go')
| -rw-r--r-- | internal/schedule/schedule.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/internal/schedule/schedule.go b/internal/schedule/schedule.go index 3828b07..7144a4d 100644 --- a/internal/schedule/schedule.go +++ b/internal/schedule/schedule.go @@ -20,7 +20,6 @@ var ( ErrNothingQueued = errors.New("nothing queued") ) -// TODO: Schedule more than N entries per week when the backlog of queued items is large enough. func Run(args config.Args, platform string) (entry.Entry, error) { dir := fmt.Sprintf("%s/db/platforms/%s", args.GosDir, strings.ToLower(platform)) stats, err := newStats(dir, args.Lookback, args.Target) @@ -40,7 +39,7 @@ func Run(args config.Args, platform string) (entry.Entry, error) { if err != nil && !errors.Is(err, oi.ErrNotFound) { return en, nil // Unknown error } - if !en.HasTag("now") && stats.targetHit(args.PauseDays) { + if !en.HasTag("now") && stats.targetHit(args.PauseDays, args.MaxDaysQueued) { return entry.Zero, ErrNothingToSchedule } return en, nil |
