minor error correction for new feeds

This commit is contained in:
Ronald Schaten 2013-04-04 22:36:48 +02:00
parent 8da6ef9010
commit 58177038c3

View File

@ -52,6 +52,9 @@ class Feedinfo(Base):
self.lastfetched = datetime.now()
if parser.get('status') == 200 or parser.get('status') == 302:
self.lastsuccessful = datetime.now()
if self.feed:
waitminutes = randint(int(self.feed.frequency * .75), int(self.feed.frequency * 1.25))
else:
waitminutes = 0
self.nextfetch = (datetime.now() + timedelta(minutes=waitminutes))