comparison backend/sqlalchemy/SqlAlchemyBackend.py @ 167:a3c945ce434c

adjust the sqlalchemy backend to the changes in AbstractFeedUpdater
author dirk
date Mon, 05 Sep 2011 19:39:08 +0200
parents a05719a6175e
children f4708d38419c
comparison
equal deleted inserted replaced
166:04c3b9796b89 167:a3c945ce434c
73 self.session.delete(self.selectedFeed) 73 self.session.delete(self.selectedFeed)
74 self.session.commit() 74 self.session.commit()
75 75
76 def createFeed(self, url): 76 def createFeed(self, url):
77 try: 77 try:
78 FeedUpdater.createNewFeed(url, self.session) 78 newFeed = Feed(url)
79 self.session.add(newFeed)
80
81 FeedUpdater.FeedUpdater(self.preferences(), self.session).update(newFeed)
79 self.session.commit() 82 self.session.commit()
80 except AttributeError as ae: 83 except AttributeError as ae:
81 self.session.rollback() 84 self.session.rollback()
82 raise ae 85 raise ae
83 86
84 def updateAllFeeds(self): 87 def updateAllFeeds(self):
85 FeedUpdater.updateAllFeeds(self.session) 88 FeedUpdater.updateAllFeeds(self.preferences(), self.session)
86 self.session.commit() 89 self.session.commit()
87 90
88 def updateFeed(self, feed, changes): 91 def updateFeed(self, feed, changes):
89 feed.takeChangesFrom(changes) 92 feed.takeChangesFrom(changes)
90 feed.incrementNextUpdateDate() 93 feed.incrementNextUpdateDate()