From caf859129d45fa502bfec46dbd3569472f60e379 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Thu, 1 Feb 2007 00:26:15 +0000 Subject: [PATCH] - Made exipred sessions workflow activity more fault tollerant. - Made rss fetching more fault tollerant. --- docs/changelog/7.x.x.txt | 2 ++ lib/WebGUI/Workflow/Activity/DeleteExpiredSessions.pm | 6 +++++- lib/WebGUI/Workflow/Activity/GetSyndicatedContent.pm | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index cca721502..4766d279d 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -14,6 +14,8 @@ - fix: Added better error trapping for WikiMaster - fix: Wiki causes site to fail - fix: Wiki Error on plainblack.com + - Made exipred sessions workflow activity more fault tollerant. + - Made rss fetching more fault tollerant. - fix: lack of testing for valid object creation - fix: No mention of intermediate upgrade step in gotcha's - fix: A newly released version of Html::Template fixes a bug with global diff --git a/lib/WebGUI/Workflow/Activity/DeleteExpiredSessions.pm b/lib/WebGUI/Workflow/Activity/DeleteExpiredSessions.pm index d942b5afa..55be67ad6 100644 --- a/lib/WebGUI/Workflow/Activity/DeleteExpiredSessions.pm +++ b/lib/WebGUI/Workflow/Activity/DeleteExpiredSessions.pm @@ -69,14 +69,18 @@ See WebGUI::Workflow::Activity::execute() for details. sub execute { my $self = shift; my $sth = $self->session->db->read("select sessionId from userSession where expiresarray) { my $session = WebGUI::Session->open($self->session->config->getWebguiRoot, $self->session->config->getFilename, undef, undef, $sessionId, 1); if (defined $session) { $session->var->end; $session->close; } + if ((time() - $time) > 55) { + $sth->finish; + return $self->WAITING; + } } - $sth->finish; return $self->COMPLETE; } diff --git a/lib/WebGUI/Workflow/Activity/GetSyndicatedContent.pm b/lib/WebGUI/Workflow/Activity/GetSyndicatedContent.pm index ef7ab4efc..b19e33f8b 100644 --- a/lib/WebGUI/Workflow/Activity/GetSyndicatedContent.pm +++ b/lib/WebGUI/Workflow/Activity/GetSyndicatedContent.pm @@ -91,8 +91,8 @@ sub execute { # May need to fix this in the future. my $returnValue = WebGUI::Asset::Wobject::SyndicatedContent::_get_rss_data($self->session, $url); unless (defined $returnValue) { - $self->session->errorHandler->error("GetSyndicatedContent Workflow Activity: _get_rss_data returned undef while trying to process syndicated content url $url"); - return $self->ERROR; + $self->session->errorHandler->error("GetSyndicatedContent Workflow Activity: _get_rss_data returned undef while trying to process syndicated content url $url, which usually indicates an improper URL, or a malformed document"); + next; } }