comparison backend/sqlalchemy/FeedUpdater.py @ 160:86f828096aaf

Do not fetch and parse the feed twice when creating a new one. Pass the parsed info into the update method instead to reuse.
author dirk
date Mon, 29 Aug 2011 03:07:50 +0200
parents 74217db92993
children a3c945ce434c
comparison
equal deleted inserted replaced
159:7d724cf2dcf7 160:86f828096aaf
28 else: 28 else:
29 title = url 29 title = url
30 newFeed = Feed(title, url) 30 newFeed = Feed(title, url)
31 session.add(newFeed) 31 session.add(newFeed)
32 32
33 FeedUpdater(session, newFeed).update() 33 FeedUpdater(session, newFeed).update(result)
34 34
35 35
36 class FeedUpdater(AbstractFeedUpdater): 36 class FeedUpdater(AbstractFeedUpdater):
37 def __init__(self, session, feed): 37 def __init__(self, session, feed):
38 AbstractFeedUpdater.__init__(self, feed) 38 AbstractFeedUpdater.__init__(self, feed)