From 8ec8da0491ad89604700b3e29a227966f6d84ba1 Mon Sep 17 00:00:00 2001 From: Perl Tidy Date: Wed, 5 Dec 2018 15:38:52 -0500 Subject: no bug - reformat all the code using the new perltidy rules --- scripts/sendunsentbugmail.pl | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) (limited to 'scripts/sendunsentbugmail.pl') diff --git a/scripts/sendunsentbugmail.pl b/scripts/sendunsentbugmail.pl index a8e1ed4dc..0f110d996 100755 --- a/scripts/sendunsentbugmail.pl +++ b/scripts/sendunsentbugmail.pl @@ -12,7 +12,6 @@ use warnings; use lib qw(. lib local/lib/perl5); - use Bugzilla; use Bugzilla::Constants; use Bugzilla::BugMail; @@ -20,29 +19,29 @@ use Bugzilla::BugMail; my $dbh = Bugzilla->dbh; my $list = $dbh->selectcol_arrayref( - 'SELECT bug_id FROM bugs + 'SELECT bug_id FROM bugs WHERE lastdiffed IS NULL OR lastdiffed < delta_ts AND delta_ts < ' - . $dbh->sql_date_math('NOW()', '-', 30, 'MINUTE') . - ' ORDER BY bug_id'); + . $dbh->sql_date_math('NOW()', '-', 30, 'MINUTE') . ' ORDER BY bug_id' +); if (scalar(@$list) > 0) { - say "OK, now attempting to send unsent mail"; - say scalar(@$list) . " bugs found with possibly unsent mail.\n"; - foreach my $bugid (@$list) { - my $start_time = time; - say "Sending mail for bug $bugid..."; - my $outputref = Bugzilla::BugMail::Send($bugid); - if ($ARGV[0] && $ARGV[0] eq "--report") { - say "Mail sent to:"; - say $_ foreach (sort @{$outputref->{sent}}); - } - else { - my $sent = scalar @{$outputref->{sent}}; - say "$sent mails sent."; - say "Took " . (time - $start_time) . " seconds.\n"; - } + say "OK, now attempting to send unsent mail"; + say scalar(@$list) . " bugs found with possibly unsent mail.\n"; + foreach my $bugid (@$list) { + my $start_time = time; + say "Sending mail for bug $bugid..."; + my $outputref = Bugzilla::BugMail::Send($bugid); + if ($ARGV[0] && $ARGV[0] eq "--report") { + say "Mail sent to:"; + say $_ foreach (sort @{$outputref->{sent}}); + } + else { + my $sent = scalar @{$outputref->{sent}}; + say "$sent mails sent."; + say "Took " . (time - $start_time) . " seconds.\n"; } - say "Unsent mail has been sent."; + } + say "Unsent mail has been sent."; } -- cgit v1.2.3-24-g4f1b