Mercurial > hg > Feedworm
diff backend/sqlalchemy/SqlAlchemyBackend.py @ 121:510a5d00e98a backend
re-enabled AddFeed - does not work yet
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Sun, 21 Aug 2011 04:17:13 +0200 |
parents | 04a730f9d07d |
children | f5afe0c1f4d2 |
line wrap: on
line diff
--- a/backend/sqlalchemy/SqlAlchemyBackend.py Sun Aug 21 04:04:37 2011 +0200 +++ b/backend/sqlalchemy/SqlAlchemyBackend.py Sun Aug 21 04:17:13 2011 +0200 @@ -1,5 +1,6 @@ from Preferences import Preferences +from FeedUpdater import FeedUpdater import Database import logging import util @@ -14,6 +15,7 @@ self._initLogging() self.session = Database.createSession() self.prefs = Preferences(self.session) + self.updater = None def _initLogging(self): logging.getLogger("sqlalchemy.orm").setLevel(logging.WARN) @@ -26,6 +28,11 @@ def preferences(self): return self.prefs + def feedUpdater(self): + if self.updater is None: + self.updater = FeedUpdater(self.session) + return self.updater + def getFeeds(self): return FeedList.getFeeds(self.session)