minor error correction for new feeds
This commit is contained in:
parent
8da6ef9010
commit
58177038c3
@ -52,6 +52,9 @@ class Feedinfo(Base):
|
|||||||
self.lastfetched = datetime.now()
|
self.lastfetched = datetime.now()
|
||||||
if parser.get('status') == 200 or parser.get('status') == 302:
|
if parser.get('status') == 200 or parser.get('status') == 302:
|
||||||
self.lastsuccessful = datetime.now()
|
self.lastsuccessful = datetime.now()
|
||||||
|
if self.feed:
|
||||||
waitminutes = randint(int(self.feed.frequency * .75), int(self.feed.frequency * 1.25))
|
waitminutes = randint(int(self.feed.frequency * .75), int(self.feed.frequency * 1.25))
|
||||||
|
else:
|
||||||
|
waitminutes = 0
|
||||||
self.nextfetch = (datetime.now() + timedelta(minutes=waitminutes))
|
self.nextfetch = (datetime.now() + timedelta(minutes=waitminutes))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user