Temporarily killing all feed fetch histories grater than 5 back. This will screw up the home page statistics, but it's costing too much.

This commit is contained in:
Samuel Clay 2011-04-26 11:44:19 -04:00
parent 5a4640afa4
commit 4429fef6c8

View file

@ -251,7 +251,7 @@ class Feed(models.Model):
fetch_date=datetime.datetime.utcnow()).save()
day_ago = datetime.datetime.now() - datetime.timedelta(hours=24)
new_fetch_histories = MFeedFetchHistory.objects(feed_id=self.pk, fetch_date__gte=day_ago)
if new_fetch_histories.count() < 5:
if new_fetch_histories.count() < 5 or True:
old_fetch_histories = MFeedFetchHistory.objects(feed_id=self.pk)[5:]
else:
old_fetch_histories = MFeedFetchHistory.objects(feed_id=self.pk, fetch_date__lte=day_ago)