Skip to content
Snippets Groups Projects

Fix bug where RSS feeds got lost when a fetching error occured

Merged Torsten Grote requested to merge 871-rss-feeds-lost into master
2 files
+ 143
1
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -291,8 +291,12 @@ class FeedManagerImpl implements FeedManager, Client, EventListener,
* This method is called periodically from a background service.
* It fetches all available feeds and posts new entries to the respective
* blog.
*
* We can not do this within one database {@link Transaction},
* because fetching can take a long time
* and we can not block the database that long.
*/
private void fetchFeeds() {
void fetchFeeds() {
LOG.info("Updating RSS feeds...");
// Get current feeds
@@ -313,12 +317,15 @@ class FeedManagerImpl implements FeedManager, Client, EventListener,
} catch (FeedException e) {
if (LOG.isLoggable(WARNING))
LOG.log(WARNING, e.toString(), e);
newFeeds.add(feed);
} catch (IOException e) {
if (LOG.isLoggable(WARNING))
LOG.log(WARNING, e.toString(), e);
newFeeds.add(feed);
} catch (DbException e) {
if (LOG.isLoggable(WARNING))
LOG.log(WARNING, e.toString(), e);
newFeeds.add(feed);
}
}
Loading