Browse files

Set lastget based on what the RSS feed contained, and not when we las…

…t checked it. Hopefully this

will fix cases where the time being different between server and planet caused blogs not to update.
  • Loading branch information...
1 parent e1befe8 commit 584b3f57da4453d3b9274a3d57e7d4435542035b @mhagander committed Oct 20, 2008
Showing with 3 additions and 2 deletions.
  1. +3 −2
@@ -48,8 +48,9 @@ def ParseFeed(self, feedinfo):
guidisperma = True
self.StoreEntry(feedinfo[0],,,, guidisperma, entry.title, txt)
- self.db.cursor().execute('UPDATE planet.feeds SET lastget=%(lg)s WHERE id=%(feed)s', {'lg':parsestart, 'feed': feedinfo[0]})
+ self.db.cursor().execute("UPDATE planet.feeds SET lastget=COALESCE((SELECT max(dat) FROM planet.posts WHERE,'2000-01-01') WHERE", {'feed': feedinfo[0]})
+ #self.db.cursor().execute('UPDATE planet.feeds SET lastget=%(lg)s WHERE id=%(feed)s', {'lg':parsestart, 'feed': feedinfo[0]})
def StoreEntry(self, feedid, guid, date, link, guidisperma, title, txt):
c = self.db.cursor()
c.execute("SELECT id FROM planet.posts WHERE feed=%(feed)s AND guid=%(guid)s", {'feed':feedid, 'guid':guid})

0 comments on commit 584b3f5

Please sign in to comment.