Mercurial > hg > Feedworm
comparison 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 |
comparison
equal
deleted
inserted
replaced
173:3bcf39181f6e | 174:d0ced79b5030 |
---|---|
20 try: | 20 try: |
21 return iter(result).next() | 21 return iter(result).next() |
22 except StopIteration: | 22 except StopIteration: |
23 return None | 23 return None |
24 | 24 |
25 @staticmethod | |
26 def getReadFeedEntriesOlderThan(timestamp, database): | |
27 end = [timestamp.year, timestamp.month, timestamp.day, timestamp.hour, timestamp.minute, | |
28 timestamp.second] | |
29 # end = str(end).replace(" ", "") | |
30 return FeedEntry.view(database, CouchDb.readFeedEntriesByCreateDate(), endkey=end) | |
31 | |
25 def markRead(self, database): | 32 def markRead(self, database): |
26 self.read = True | 33 self.read = True |
27 self.store(database) | 34 self.store(database) |
28 | 35 |
29 def toggleRead(self, database): | 36 def toggleRead(self, database): |