Mercurial > hg > Feedworm
diff backend/couchdb/FeedEntry.py @ 174:d0ced79b5030
implement expiring read feed entries
author | dirk |
---|---|
date | Fri, 09 Sep 2011 17:21:34 +0200 |
parents | 27be2a5f9c10 |
children | 1ab48428e2f9 |
line wrap: on
line diff
--- a/backend/couchdb/FeedEntry.py Fri Sep 09 17:19:16 2011 +0200 +++ b/backend/couchdb/FeedEntry.py Fri Sep 09 17:21:34 2011 +0200 @@ -22,6 +22,13 @@ except StopIteration: return None + @staticmethod + def getReadFeedEntriesOlderThan(timestamp, database): + end = [timestamp.year, timestamp.month, timestamp.day, timestamp.hour, timestamp.minute, + timestamp.second] +# end = str(end).replace(" ", "") + return FeedEntry.view(database, CouchDb.readFeedEntriesByCreateDate(), endkey=end) + def markRead(self, database): self.read = True self.store(database)