mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
there's no need to update disabledUntil here anymore because findNextUpdatableFeeds will always be called when the queue is empty
This commit is contained in:
@@ -92,17 +92,7 @@ public class FeedRefreshEngine implements Managed {
|
|||||||
|
|
||||||
private List<Feed> findNextUpdatableFeeds(int max, Date lastLoginThreshold) {
|
private List<Feed> findNextUpdatableFeeds(int max, Date lastLoginThreshold) {
|
||||||
refill.mark();
|
refill.mark();
|
||||||
|
return UnitOfWork.call(sessionFactory, () -> feedDAO.findNextUpdatable(max, lastLoginThreshold));
|
||||||
return UnitOfWork.call(sessionFactory, () -> {
|
|
||||||
List<Feed> list = feedDAO.findNextUpdatable(max, lastLoginThreshold);
|
|
||||||
|
|
||||||
// set the disabledDate as we use it in feedDAO.findNextUpdatable() to decide what to refresh next
|
|
||||||
Date nextRefreshDate = DateUtils.addMinutes(new Date(), config.getApplicationSettings().getRefreshIntervalMinutes());
|
|
||||||
list.forEach(f -> f.setDisabledUntil(nextRefreshDate));
|
|
||||||
feedDAO.saveOrUpdate(list);
|
|
||||||
|
|
||||||
return list;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getBatchSize() {
|
private int getBatchSize() {
|
||||||
|
|||||||
Reference in New Issue
Block a user