Mercurial > hg > Feedworm
comparison backend/couchdb/CouchDbBackend.py @ 144:74217db92993
updating feeds on the couchdb backend works now
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Wed, 24 Aug 2011 11:54:06 +0200 |
parents | 2cd30af937fa |
children | 8ec20377bcb0 |
comparison
equal
deleted
inserted
replaced
143:f0941f42314c | 144:74217db92993 |
---|---|
1 | 1 |
2 from FeedUpdater import FeedUpdater | |
2 from Preferences import Preferences | 3 from Preferences import Preferences |
3 from backend.couchdb.Feed import Feed | 4 from backend.couchdb.Feed import Feed |
4 import couchdb | 5 import couchdb |
5 | 6 |
6 | 7 |
42 def updateAllFeeds(self): | 43 def updateAllFeeds(self): |
43 # TODO use a view instead of iterating all feeds | 44 # TODO use a view instead of iterating all feeds |
44 allFeeds = Feed.all(self.database) | 45 allFeeds = Feed.all(self.database) |
45 for feed in allFeeds: | 46 for feed in allFeeds: |
46 if feed.needsUpdate(): | 47 if feed.needsUpdate(): |
47 print("feed needs update " + str(feed)) | 48 FeedUpdater(feed, self.database).update() |
48 | 49 |
49 def expireFeedEntries(self): | 50 def expireFeedEntries(self): |
50 print("Expiring feeds is not yet implemented") | 51 print("Expiring feeds is not yet implemented") |
51 # raise Exception("not yet implemented") | 52 # raise Exception("not yet implemented") |
52 | 53 |