Thursday, April 14, 2011 at 1:07 AM.
radioReallySimpleSuite.checkRetries
on checkRetries () { <<Changes <<4/10/11; 7:00:10 PM by DW <<Created. local (adrdata = radioreallysimplesuite.init (), now = clock.now (), adruser, cutofftime); bundle { //set cutofftime cutofftime = now - (24 * 60 * 60)}; for adruser in @adrdata^.users { if adruser^.prefs.flRetryEnabled { on visit (adritem) { if adritem^.when < cutofftime { //stop looking within this calendar return (false)}; if defined (adritem^.stats) { if not adritem^.stats.flgood { if now >= adritem^.stats.whenNextRetry { try { local (xstruct, adrstatus); twitter.newpost (adritem^.status, adruser:adruser, adrResponse:@xstruct); adrstatus = xml.getaddress (@xstruct, "status"); adritem^.stats.flGood = true; adritem^.stats.id= xml.getvalue (adrstatus, "id"); adritem^.xstruct = xstruct} else { adritem^.stats.ctErrors++; adritem^.stats.whenNextRetry = now + (10 * 60)}}}}; //ten minutes return (true)}; mainresponder.calendar.visitReverseChronologic (@adruser^.calendar, @visit)}}}; bundle { //test code checkRetries ()}
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.