Bug 29076: Fetch the zebraqueue entries when not confirm
This patch remove a check for confirm when fetching the entries for possible deletion from the zebraqueue Without this we die when we try to access the entries for counting To test: 1 - perl misc/cronjobs/cleanup_database.pl --sessions --zebraqueue 10 --list-invites --z3950 --logs 180 --mail 375 -v 2 - Dies 3 - Apply patch 4 - Repeat 1 5 - Success! Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
parent
a73395f7fa
commit
619e60fd55
1 changed files with 1 additions and 3 deletions
|
@ -283,9 +283,7 @@ if ($zebraqueue_days) {
|
|||
WHERE done=1 AND time < date_sub(curdate(), INTERVAL ? DAY)
|
||||
}
|
||||
);
|
||||
if ( $confirm ) {
|
||||
$sth->execute($zebraqueue_days) or die $dbh->errstr;
|
||||
}
|
||||
$sth->execute($zebraqueue_days) or die $dbh->errstr;
|
||||
$sth2 = $dbh->prepare(q{ DELETE FROM zebraqueue WHERE id=? });
|
||||
while ( my $record = $sth->fetchrow_hashref ) {
|
||||
if ( $confirm ) {
|
||||
|
|
Loading…
Reference in a new issue