Saturday, April 02, 2011 at 9:20 PM.
rssCloudSuite.removeExpiredSubscriptions
on removeExpiredSubscriptions () {
<<Changes
<<7/19/09; 12:21:47 PM by DW
<<Expire subscriptions when there are too many consecutive errors.
<<7/16/09; 10:45:06 AM by DW
<<Created.
local (adrdata = rssCloudSuite.init (), adrresource, now = clock.now ());
local (maxerrors = adrdata^.prefs.maxConsecutiveErrors);
for adrresource in @adrdata^.subscriptions {
local (i, adrsub);
for i = sizeof (adrresource^) downto 1 {
adrsub = @adrresource^ [i];
rssCloudSuite.initSubscription (adrsub);
if (adrsub^.whenExpires < now) or (adrsub^.ctConsecutiveErrors >= maxerrors) {
delete (adrsub)}};
if sizeof (adrresource^) == 0 {
delete (adrresource)}}};
bundle { //test code
removeExpiredSubscriptions ()}
This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.