Mercurial > hg > Feedworm
comparison backend/couchdb/CouchDbBackend.py @ 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 | 4cb22b47b659 |
children | b0de75d57e78 |
comparison
equal
deleted
inserted
replaced
210:e2c70c92da02 | 211:1ac0b8e2feae |
---|---|
106 def updateAllFeeds(self): | 106 def updateAllFeeds(self): |
107 # TODO use a view instead of iterating all feeds | 107 # TODO use a view instead of iterating all feeds |
108 allFeeds = Feed.all(self.database) | 108 allFeeds = Feed.all(self.database) |
109 for feed in allFeeds: | 109 for feed in allFeeds: |
110 if feed.needsUpdate(): | 110 if feed.needsUpdate(): |
111 FeedUpdater(self.database, self.preferences()).update(feed) | 111 try: |
112 FeedUpdater(self.database, self.preferences()).update(feed) | |
113 except Exception as ex: | |
114 logging.getLogger("FeedUpdate").error("Exception during fetch: " + str(ex)) | |
112 | 115 |
113 def expireFeedEntries(self): | 116 def expireFeedEntries(self): |
114 expireDate = self._calculateExpireDate() | 117 expireDate = self._calculateExpireDate() |
115 logger = logging.getLogger("expiry") | 118 logger = logging.getLogger("expiry") |
116 logger.info("expiring entries older than " + str(expireDate)) | 119 logger.info("expiring entries older than " + str(expireDate)) |