Skip to content
Permalink
Browse files

Fix POD, remove dead code, use correct TTL in SendNewsletters.

  • Loading branch information...
perlDreamer committed Sep 11, 2009
1 parent 785523f commit 229aaaa2702a663e231906ecee462a34fba0ce26
Showing with 4 additions and 10 deletions.
  1. +4 −10 lib/WebGUI/Workflow/Activity/SendNewsletters.pm
@@ -22,15 +22,11 @@ use WebGUI::Mail::Send;

=head1 NAME
Package WebGUI::Workflow::Activity::Skeleton
Package WebGUI::Workflow::Activity::SendNewsletters
=head1 DESCRIPTION
Tell a little about what this activity does.
=head1 SYNOPSIS
See WebGUI::Workflow::Activity for details on how to use any activity.
Process subscription requests from all Newsletters and send emails.
=head1 METHODS
@@ -62,16 +58,14 @@ sub definition {

#-------------------------------------------------------------------

=head2 execute ( [ object ] )
=head2 execute ( )
See WebGUI::Workflow::Activity::execute() for details.
=cut

sub execute {
my $self = shift;
my $object = shift;
my $instance = shift;
my ($db,$eh) = $self->session->quick(qw(db errorHandler));

my $time = time();
@@ -195,7 +189,7 @@ sub execute {
$db->write("update Newsletter_subscriptions set lastTimeSent = ?", [time()]);

# timeout if we're taking too long
if (time() - $time > 50) {
if (time() - $time > $self->getTTL ) {
$eh->info("Oops. Ran out of time. Will continue building newsletters in a bit.");
$subscriptionResultSet->finish;
return $self->WAITING(1);

0 comments on commit 229aaaa

Please sign in to comment.
You can’t perform that action at this time.