Tuesday, March 29, 2011 at 1:07 AM.
river2Suite.rpcHandlers.feedUpdated
on feedUpdated (urlfeed) { <<Changes <<3/25/11; 12:15:08 AM by DW <<Call the feedUpdated callbacks. <<11/17/10; 3:10:45 PM by DW <<Read the feed in this thread, instead of forking off a new one. <<11/17/10; 12:42:33 PM by DW <<Only read the feed once for each notification, and do it in a separate thread after returning to the caller. <<9/15/09; 10:44:58 AM by DW <<Only accept notification for feeds we're subscribed to. <<9/7/09; 4:17:36 PM by DW <<Add threaded call to river2Suite.readFeedAfterNotify. <<8/10/09; 2:52:22 PM by DW <<Tweaked logging for the "Notified" event. <<7/17/09; 2:01:50 PM by DW <<Created. local (adrdata = river2suite.init (), startticks = clock.ticks ()); local (adrfeed = @adrdata^.feeds.[urlfeed]); bundle { //stats adrdata^.stats.ctRealTimeUpdates++; adrdata^.stats.whenLastRealtimeUpdate = clock.now (); adrdata^.stats.urlLastRealtimeUpdate = urlfeed}; if defined (adrfeed^) { //must be subscribed to the feed, 9/15/09 by DW <<thread.callscript (@river2Suite.readFeedAfterNotify, {urlfeed}) //9/7/09 by DW river2Suite.readFeed (urlfeed); bundle { //callbacks, 3/25/11 by DW local (adrscript); for adrscript in @adrdata^.callbacks.feedUpdated { while typeof (adrscript^) == addresstype { adrscript = adrscript^}; try {adrscript^ (urlfeed)}}}; system.temp.river2.flStaticBuild = true; //11/17/10 by DW bundle { //log it local (s); try { s = "The feed <a href=\"" + urlfeed + "\">" + adrfeed^.feedInfo.title + "</a> updated."} else { s = "Received notification that a <a href=\"" + urlfeed + "\">feed</a> we're subscribed to has updated."}; log2.add (river2Info.name, "Notified", s, startticks)}}; return (true)} <<bundle //test code <<feedUpdated ("http://static.lifeliner.org/dave/rss.xml")
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.