rename variable because it now contains a duration

This commit is contained in:
Athou
2024-09-10 20:47:08 +02:00
parent 37722131e5
commit 9930bb68b2

View File

@@ -54,9 +54,9 @@ public class FeedRefreshWorker {
entries = entries.stream().limit(maxFeedCapacity).toList();
}
Duration maxEntriesAgeDays = config.database().cleanup().entriesMaxAge();
if (!maxEntriesAgeDays.isZero()) {
Instant threshold = Instant.now().minus(maxEntriesAgeDays);
Duration entriesMaxAge = config.database().cleanup().entriesMaxAge();
if (!entriesMaxAge.isZero()) {
Instant threshold = Instant.now().minus(entriesMaxAge);
entries = entries.stream().filter(entry -> entry.published().isAfter(threshold)).toList();
}