diff backend/couchdb/CouchDbBackend.py @ 139:2cd30af937fa

add the required methods for determining if a feed needs to be updated
author Dirk Olmes <dirk@xanthippe.ping.de>
date Tue, 23 Aug 2011 16:02:35 +0200
parents 9e1e6b96d8b0
children 74217db92993
line wrap: on
line diff
--- a/backend/couchdb/CouchDbBackend.py	Tue Aug 23 14:36:58 2011 +0200
+++ b/backend/couchdb/CouchDbBackend.py	Tue Aug 23 16:02:35 2011 +0200
@@ -1,7 +1,9 @@
 
 from Preferences import Preferences
+from backend.couchdb.Feed import Feed
 import couchdb
 
+
 DATABASE = "feedtest"
 
 class CouchDbBackend(object):
@@ -38,10 +40,15 @@
         raise Exception("not yet implemented")
 
     def updateAllFeeds(self):
-        raise Exception("not yet implemented")
+        # TODO use a view instead of iterating all feeds
+        allFeeds = Feed.all(self.database)
+        for feed in allFeeds:
+            if feed.needsUpdate():
+                print("feed needs update " + str(feed))
 
     def expireFeedEntries(self):
-        raise Exception("not yet implemented")
+        print("Expiring feeds is not yet implemented")
+#        raise Exception("not yet implemented")
 
     def dispose(self):
         # nothing to do here