diff feedupdate-main.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 d21f5025034d
line wrap: on
line diff
--- a/feedupdate-main.py	Wed May 05 02:14:05 2010 +0200
+++ b/feedupdate-main.py	Wed May 05 03:07:59 2010 +0200
@@ -2,18 +2,12 @@
 
 import Database
 from Feed import Feed
-from FeedUpdater import updateAllFeeds
+import FeedUpdater
 import logging
 import util
 
 logger = logging.getLogger("feedupdater")
 
-def createFeed(session):
-    if len(session.query(Feed).all()) == 0:
-        newFeed = Feed("Joel on Software", "http://www.joelonsoftware.com/rss.xml")
-        session.add(newFeed)
-        session.commit()
-
 def listFeeds(session):
     allFeeds = session.query(Feed)
     for feed in allFeeds:
@@ -25,7 +19,9 @@
     util.configureLogging()
     session = Database.createSession()
     
-    #createFeed(session)
-    #updateAllFeeds(session)
+    #util.loadFeeds(session)
+    #util.forceUpdateAllFeeds(session)
     #listFeeds(session)
-    #session.close()
+    FeedUpdater.updateAllFeeds(session)
+    
+    session.close()