more config checks on startup

This commit is contained in:
Athou
2014-12-04 10:52:41 +01:00
parent 9110cfd923
commit c702f47927
13 changed files with 47 additions and 31 deletions

View File

@@ -154,7 +154,7 @@ public class FeedQueues {
}
private Date getLastLoginThreshold() {
if (config.getApplicationSettings().isHeavyLoad()) {
if (config.getApplicationSettings().getHeavyLoad()) {
return DateUtils.addDays(new Date(), -30);
} else {
return null;

View File

@@ -152,7 +152,7 @@ public class FeedRefreshUpdater implements Managed {
}
}
if (config.getApplicationSettings().isPubsubhubbub()) {
if (config.getApplicationSettings().getPubsubhubbub()) {
handlePubSub(feed);
}
if (!ok) {

View File

@@ -90,7 +90,7 @@ public class FeedRefreshWorker implements Managed {
// stops here if NotModifiedException or any other exception is thrown
List<FeedEntry> entries = fetchedFeed.getEntries();
if (config.getApplicationSettings().isHeavyLoad()) {
if (config.getApplicationSettings().getHeavyLoad()) {
disabledUntil = FeedUtils.buildDisabledUntil(fetchedFeed.getFeed().getLastEntryDate(), fetchedFeed.getFeed()
.getAverageEntryInterval(), disabledUntil);
}
@@ -118,7 +118,7 @@ public class FeedRefreshWorker implements Managed {
} catch (NotModifiedException e) {
log.debug("Feed not modified : {} - {}", feed.getUrl(), e.getMessage());
if (config.getApplicationSettings().isHeavyLoad()) {
if (config.getApplicationSettings().getHeavyLoad()) {
disabledUntil = FeedUtils.buildDisabledUntil(feed.getLastEntryDate(), feed.getAverageEntryInterval(), disabledUntil);
}
feed.setErrorCount(0);