migrated the get syndicated content hourly script to workflow

This commit is contained in:
JT Smith 2006-03-02 21:48:48 +00:00
parent 2139b9e5d4
commit 1a5bd9e647
5 changed files with 112 additions and 47 deletions

View file

@ -1,34 +0,0 @@
package Hourly::GetSyndicatedContent;
use strict;
use warnings;
use WebGUI::SQL;
use WebGUI::Asset::Wobject::SyndicatedContent;
=head2 Hourly::GetSyndicatedContent
Loops through all the URLs in the SyndicatedWobjects and puts them into WebGUI::Cache if they haven't been spidered or if they have expired from the cache. This should reduce HTTP traffic a little, and allow for more granular scheduling of feed downloads in the future.
=cut
#-------------------------------------------------------------------
sub process{
#In the new Wobject, "rssURL" actually can refer to more than one URL.
my @syndicatedWobjectURLs = WebGUI::SQL->buildArray("select distinct SyndicatedContent.rssUrl from SyndicatedContent left join asset on SyndicatedContent.assetId=asset.assetId where asset.state='published'");
foreach my $url(@syndicatedWobjectURLs) {
#Loop through the SyndicatedWobjects and split all the URLs they are syndicating off into
#a separate array.
my @urlsToSyndicate = split(/\s+/,$url);
foreach ((@urlsToSyndicate)) {
WebGUI::Asset::Wobject::SyndicatedContent::_get_rss_data($_);
}
}
}
1;