From 490aa281990dbda4cea9c96ee8e47ddf8dba949f Mon Sep 17 00:00:00 2001 From: "Neal H. Walfield" Date: Sun, 27 Nov 2011 20:34:35 +0100 Subject: [PATCH] Fix ArchivedArticles' update function. - Use the dispatcher so that the update daemon does the update. - Call postFeedUpdateFunc on completion. --- src/rss_sqlite.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/rss_sqlite.py b/src/rss_sqlite.py index 503c9d3..09f8462 100644 --- a/src/rss_sqlite.py +++ b/src/rss_sqlite.py @@ -887,7 +887,8 @@ class ArchivedArticles(Feed): self.db.execute("INSERT INTO feed (id, title, contentLink, date, updated, link, read) VALUES (?, ?, ?, ?, ?, ?, ?);", values) self.db.commit() - def updateFeed(self, configdir, url, etag, modified, expiryTime=24, proxy=None, imageCache=False, priority=0, postFeedUpdateFunc=None, *postFeedUpdateFuncArgs): + # Feed.UpdateFeed calls this function. + def _updateFeed(self, configdir, url, etag, modified, expiryTime=24, proxy=None, imageCache=False, priority=0, postFeedUpdateFunc=None, *postFeedUpdateFuncArgs): currentTime = 0 rows = self.db.execute("SELECT id, link FROM feed WHERE updated=0;") for row in rows: @@ -917,7 +918,10 @@ class ArchivedArticles(Feed): except: logger.error("Error updating Archived Article: %s %s" % (link,traceback.format_exc(),)) - return (currentTime, None, None) + + if postFeedUpdateFunc is not None: + postFeedUpdateFunc (self.key, currentTime, None, None, None, + *postFeedUpdateFuncArgs) def purgeReadArticles(self): rows = self.db.execute("SELECT id FROM feed WHERE read=1;") -- 1.7.9.5