changeset 211:1ac0b8e2feae

wrap the individual feed update with an exception handler so that a sinlge broken feed doesn't halt the entire update process
author Dirk Olmes <dirk@xanthippe.ping.de>
date Mon, 12 Nov 2012 08:10:40 +0100
parents e2c70c92da02
children b0de75d57e78
files backend/couchdb/CouchDbBackend.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/backend/couchdb/CouchDbBackend.py	Wed Jul 25 08:00:43 2012 +0200
+++ b/backend/couchdb/CouchDbBackend.py	Mon Nov 12 08:10:40 2012 +0100
@@ -108,7 +108,10 @@
         allFeeds = Feed.all(self.database)
         for feed in allFeeds:
             if feed.needsUpdate():
-                FeedUpdater(self.database, self.preferences()).update(feed)
+                try:
+                    FeedUpdater(self.database, self.preferences()).update(feed)
+                except Exception as ex:
+                    logging.getLogger("FeedUpdate").error("Exception during fetch: " + str(ex))
 
     def expireFeedEntries(self):
         expireDate = self._calculateExpireDate()