diff feedupdate-main.py @ 34:5813e3c10f14

move the database logic out into its own module. Make everything reload safe so that multiple sessions can be created from interactive sessions
author Dirk Olmes <dirk@xanthippe.ping.de>
date Wed, 05 May 2010 02:14:05 +0200
parents 42a225be7e56
children aaec263f07ca
line wrap: on
line diff
--- a/feedupdate-main.py	Fri Apr 30 06:22:33 2010 +0200
+++ b/feedupdate-main.py	Wed May 05 02:14:05 2010 +0200
@@ -1,9 +1,10 @@
 #!/usr/bin/env python
 
+import Database
 from Feed import Feed
 from FeedUpdater import updateAllFeeds
 import logging
-from util import configureLogging, createSession
+import util
 
 logger = logging.getLogger("feedupdater")
 
@@ -21,9 +22,10 @@
             print entry.title
 
 if __name__ == "__main__":
-    configureLogging()
-    session = createSession()
+    util.configureLogging()
+    session = Database.createSession()
     
-    createFeed(session)
-    updateAllFeeds(session)
+    #createFeed(session)
+    #updateAllFeeds(session)
     #listFeeds(session)
+    #session.close()