From cb1da1eef0c00e6e05967eecca4771bdb6987784 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 23 Jun 2020 12:19:09 +0200 Subject: [PATCH] Bug 24153: Remove warning for message queue --- misc/cronjobs/cleanup_database.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/misc/cronjobs/cleanup_database.pl b/misc/cronjobs/cleanup_database.pl index 9b3e5d7071..a64cfd724b 100755 --- a/misc/cronjobs/cleanup_database.pl +++ b/misc/cronjobs/cleanup_database.pl @@ -278,6 +278,7 @@ if ($zebraqueue_days) { if ($mail) { print "Mail queue purge triggered for $mail days.\n" if $verbose; + $count = 0; $sth = $dbh->prepare( q{ DELETE FROM message_queue @@ -287,8 +288,10 @@ if ($mail) { if ( $confirm ) { $sth->execute($mail) or die $dbh->errstr; $count = $sth->rows; + print "$count messages were deleted from the mail queue.\nDone with message_queue purge.\n" if $verbose; + } else { + print "Messages were deleted from the mail queue.\nDone with message_queue purge.\n" if $verbose; } - print "$count messages were deleted from the mail queue.\nDone with message_queue purge.\n" if $verbose; } if ($purge_merged) { -- 2.20.1