[aKregator-devel] [Bug 113358] Dead feeds are trying to be downloaded repeaatedely
Brought to you by:
lippel
From: Frank O. <fra...@kd...> - 2005-12-05 15:43:40
|
------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. http://bugs.kde.org/show_bug.cgi?id=113358 frank.osterfeld kdemail net changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Additional Comments From frank.osterfeld kdemail net 2005-12-05 16:43 ------- 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; |