From a4306ee72754de77370e6c33488d6787f103706c Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 1 Sep 2020 10:22:26 +0200 Subject: [PATCH] Bug 22417: Remove $dbh in Koha::BackgroundJob::* Also remove unused $job_type var Signed-off-by: Kyle M Hall --- Koha/BackgroundJob/BatchUpdateAuthority.pm | 2 -- Koha/BackgroundJob/BatchUpdateBiblio.pm | 4 ---- 2 files changed, 6 deletions(-) diff --git a/Koha/BackgroundJob/BatchUpdateAuthority.pm b/Koha/BackgroundJob/BatchUpdateAuthority.pm index 3a7683dec2..24f1e9a400 100644 --- a/Koha/BackgroundJob/BatchUpdateAuthority.pm +++ b/Koha/BackgroundJob/BatchUpdateAuthority.pm @@ -75,8 +75,6 @@ sub process { total_success => 0, }; my @messages; - my $dbh = C4::Context->dbh; - $dbh->{RaiseError} = 1; RECORD_IDS: for my $record_id ( sort { $a <=> $b } @record_ids ) { next unless $record_id; # Authorities diff --git a/Koha/BackgroundJob/BatchUpdateBiblio.pm b/Koha/BackgroundJob/BatchUpdateBiblio.pm index bd279fbf40..7cb7969474 100644 --- a/Koha/BackgroundJob/BatchUpdateBiblio.pm +++ b/Koha/BackgroundJob/BatchUpdateBiblio.pm @@ -54,8 +54,6 @@ Process the modification. sub process { my ( $self, $args ) = @_; - my $job_type = $args->{job_type}; - my $job = Koha::BackgroundJobs->find( $args->{job_id} ); if ( !exists $args->{job_id} || !$job || $job->status eq 'cancelled' ) { @@ -79,8 +77,6 @@ sub process { total_success => 0, }; my @messages; - my $dbh = C4::Context->dbh; - $dbh->{RaiseError} = 1; RECORD_IDS: for my $biblionumber ( sort { $a <=> $b } @record_ids ) { last if $job->get_from_storage->status eq 'cancelled'; -- 2.24.1 (Apple Git-126)