[Koha-bugs] [Bug 32393] background job worker explodes if JSON is incorrect

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Dec 6 14:13:19 CET 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32393

--- Comment #2 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
Comment on attachment 144401
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144401
Bug 32393: Prevent invalid job to block the job queue

Review of attachment 144401:
 --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=32393&attachment=144401)
-----------------------------------------------------------------

::: misc/background_jobs_worker.pl
@@ +104,5 @@
> +            Koha::Logger->get->warn(sprintf "Job and/or frame not processed - %s", $_);
> +        } finally {
> +            $job->status('failed')->store if $job;
> +            $conn->ack( { frame => $frame } );
> +        };

The finally block is always executed regardless of the exit status of the try
block. It reads wrong to be setting the status as failed. That line belongs to
the catch IMHO.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list