feed refresh engine previously hardcoded values are now configurable (#1677)

This commit is contained in:
Athou
2025-02-11 22:14:32 +01:00
parent bde556d41f
commit 469420b5bf
5 changed files with 435 additions and 53 deletions

View File

@@ -366,7 +366,7 @@ Feed refresh engine settings
`commafeed.feed-refresh.interval`
Amount of time CommaFeed will wait before refreshing the same feed.
Default amount of time CommaFeed will wait before refreshing a feed.
@@ -383,10 +383,36 @@ Environment variable: `COMMAFEED_FEED_REFRESH_INTERVAL`</td>
<tr>
<td>
`commafeed.feed-refresh.max-interval`
Maximum amount of time CommaFeed will wait before refreshing a feed. This is used as an upper bound when:
<ul>
<li>an error occurs while refreshing a feed and we're backing off exponentially</li>
<li>we receive a Cache-Control header from the feed</li>
<li>we receive a Retry-After header from the feed</li>
</ul>
Environment variable: `COMMAFEED_FEED_REFRESH_MAX_INTERVAL`</td>
<td>
[Duration](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/time/Duration.html) [🛈](#duration-note-anchor)
</td>
<td>
`24H`
</td>
</tr>
<tr>
<td>
`commafeed.feed-refresh.interval-empirical`
If true, CommaFeed will calculate the next refresh time based on the feed's average time between entries and the time since the
last entry was published. The interval will be somewhere between the default refresh interval and 24h.
If enabled, CommaFeed will calculate the next refresh time based on the feed's average time between entries and the time since
the last entry was published. The interval will be sometimes between the default refresh interval
(`commafeed.feed-refresh.interval`) and the maximum refresh interval (`commafeed.feed-refresh.max-interval`).
See <code>FeedRefreshIntervalCalculator</code> for details.
@@ -502,6 +528,52 @@ Environment variable: `COMMAFEED_FEED_REFRESH_FORCE_REFRESH_COOLDOWN_DURATION`</
<thead>
<tr>
<th align="left" colspan="3">
&nbsp;&nbsp;&nbsp;&nbsp;Feed refresh engine error handling settings
</th>
</tr>
</thead>
<tr>
<td>
`commafeed.feed-refresh.errors.retries-before-backoff`
Number of retries before backoff is applied.
Environment variable: `COMMAFEED_FEED_REFRESH_ERRORS_RETRIES_BEFORE_BACKOFF`</td>
<td>
int
</td>
<td>
`3`
</td>
</tr>
<tr>
<td>
`commafeed.feed-refresh.errors.backoff-interval`
Duration to wait before retrying after an error. Will be multiplied by the number of errors since the last successful fetch.
Environment variable: `COMMAFEED_FEED_REFRESH_ERRORS_BACKOFF_INTERVAL`</td>
<td>
[Duration](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/time/Duration.html) [🛈](#duration-note-anchor)
</td>
<td>
`1H`
</td>
</tr>
<thead>
<tr>
<th align="left" colspan="3">
Database settings
</th>
</tr>