diff Mapping.py @ 35:aaec263f07ca

Feeds manage the point in time when the next update should happen. FeedUpdater only updates feeds that are due.
author Dirk Olmes <dirk@xanthippe.ping.de>
date Wed, 05 May 2010 03:07:59 +0200
parents 5813e3c10f14
children 12ed8b5fa08c
line wrap: on
line diff
--- a/Mapping.py	Wed May 05 02:14:05 2010 +0200
+++ b/Mapping.py	Wed May 05 03:07:59 2010 +0200
@@ -28,7 +28,9 @@
     feedTable = Table("feed", metadata,
         Column("pk", Integer, primary_key=True),
         Column("title", String(255), nullable=False),
-        Column("rss_url", String(255), nullable=False)
+        Column("rss_url", String(255), nullable=False),
+        Column("update_interval", Integer, nullable=False),
+        Column("next_update", DateTime, nullable=False)
     )
     
     feedEntryTable = Table("feed_entry", metadata,
@@ -49,6 +51,6 @@
     mapper(FeedEntry, feedEntryTable)
     mapper(Feed, feedTable,
         properties = {
-            "entries" : relation(FeedEntry, backref = "feed")
+            "entries" : relation(FeedEntry, backref="feed")
         }
     )