-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for individual feed poll timers #122
Conversation
3321806
to
f9d596e
Compare
feeds/README.md
Outdated
|
||
`packages` this configuration option is only available on certain feeds, check the README of the feed you're interested in for information on this. | ||
|
||
`schedule` this allows for polling to be configured on a schedule for this specific feed. This is supported by all feeds. The value for this field should match the format defined by the [cron library](https://pkg.go.dev/github.com/robfig/cron#hdr-CRON_Expression_Format), intervals and predefined schedules are also supported. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having the main option of poll_rate
parsed as time.Duration and feed specific schedules as cron formatted strings might be slightly confusing for users. Do we want to be consistent here? poll_rate
has the caveat that it's used as an actual duration value too for the cutoff.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm... perhaps it's worth restricting this value to be intervals set as time.Duration parsable strings which we can prepend with @every
.
I think this is flexible enough for most usecases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd vote for the prepending where necessary :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renamed schedule
to poll_rate
and changed logic to operate identically to poll_rate in the top level configuration.
58b41ff
to
06a9bf2
Compare
06a9bf2
to
c1dddc0
Compare
This follows on from #85 to introduce separate polling timers for individual feeds.
Feeds are grouped and polled based on their schedules defined in FeedOptions, alternatively a default schedule is applied based upon pollRate in the root of the configuration (which runs if
timer
is enabled in the configuration).