diff --git a/misc/workers/background_jobs_worker.pl b/misc/workers/background_jobs_worker.pl index bfe126f099..e2472d0fcd 100755 --- a/misc/workers/background_jobs_worker.pl +++ b/misc/workers/background_jobs_worker.pl @@ -202,8 +202,10 @@ $pm->wait_all_children; sub process_job { my ( $job, $args ) = @_; try { - $job->process( $args ); + $job->process($args); } catch { + Koha::Logger->get( { interface => 'worker' } ) + ->warn( sprintf "Uncaught exception processing job id=%s: %s", $job->id, $_ ); $job->status('failed')->store; }; }