Summary: | Dead feeds are trying to be downloaded repeaatedely | ||
---|---|---|---|
Product: | [Applications] akregator | Reporter: | Łukasz Derkacz <lderkacz> |
Component: | general | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 1.1.2 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Łukasz Derkacz
2005-09-26 14:54:56 UTC
Right, akregator tries to refetch broken feeds every minute. That doesn't make much sense admittedly. SVN commit 485739 by osterfeld: If an fetch error occurs (host down, parsing error), wait 30 minutes before trying again. Akregator retried to fetch the feed every minute, which is particularily painful if Akregator fails to parse an actually valid feed. BUG: 113358 M +16 -3 feed.cpp --- branches/KDE/3.5/kdepim/akregator/src/feed.cpp #485738:485739 @@ -62,9 +62,14 @@ bool markImmediatelyAsRead; bool useNotification; bool loadLinkedWebsite; - int lastFetched; bool fetchError; + + int lastErrorFetch; // save time of last fetch that went wrong. + // != lastFetch property from the archive + // (that saves the last _successfull fetch!) + // workaround for 3.5.x + int fetchTries; bool followDiscovery; RSS::Loader* loader; @@ -267,6 +272,7 @@ d->markImmediatelyAsRead = false; d->useNotification = false; d->fetchError = false; + d->lastErrorFetch = 0; d->fetchTries = 0; d->loader = 0; d->articlesLoaded = false; @@ -395,6 +401,14 @@ queue->addFeed(this); else { + uint now = QDateTime::currentDateTime().toTime_t(); + + // workaround for 3.5.x: if the last fetch went wrong, try again after 30 minutes + // this fixes annoying behaviour of akregator, especially when the host is reachable + // but Akregator can't parse the feed (the host is hammered every minute then) + if ( fetchErrorOccurred() && now - d->lastErrorFetch <= 30*60 ) + return; + int interval = -1; if (useCustomFetchInterval() ) @@ -405,8 +419,6 @@ uint lastFetch = d->archive->lastFetch(); - uint now = QDateTime::currentDateTime().toTime_t(); - if ( interval > 0 && now - lastFetch >= (uint)interval ) queue->addFeed(this); } @@ -587,6 +599,7 @@ else { d->fetchError = true; + d->lastErrorFetch = QDateTime::currentDateTime().toTime_t(); emit fetchError(this); } return; |