a bunch of bug fixes and tweaks related to workflow/versioning

This commit is contained in:
JT Smith 2006-03-23 16:56:08 +00:00
parent f73b2996da
commit 985417afd3
9 changed files with 38 additions and 9 deletions

View file

@ -69,6 +69,7 @@ See WebGUI::Workflow::Activity::execute() for details.
sub execute {
my $self = shift;
my $start = time();
foreach my $id (@{WebGUI::Mail::Send->getMessageIdsInQueue($self->session)}) {
my $message = WebGUI::Mail::Send->retrieve($self->session, $id);
if (defined $message) {
@ -77,6 +78,8 @@ sub execute {
$message->queue;
}
}
# just in case there are a lot of messages, we should release after a minutes worth of sending
last if (time() > $start + 60);
}
return $self->COMPLETE;
}