Main Koha release repository
https://koha-community.org
Jonathan Druart
ca9a598183
I have faced a problem when testing an incorrect version of bug 32370. The frame sent to the message broker was not a correct JSON encoded string, and its decoding was obviously failing, exploding the worker script. Additionally, as we don't send a ack for this frame, the next pull will result in processing the same message, and so in the same explosion. No more messages can be processed! This patch is logging the error and ack the message to the broker, in order to not get stuck. Test plan: 0. Dont' apply this patch 1. Enqueue a bad message a. Apply 32370 b. Comment the following line in Koha::BackgroundJob::enqueue $self->set_encoded_json_field( { data => $job_args, field => 'data' } ); c. restart_all d. Use the batch item modification tool to enqueue a new job => Notice the error in the log => Note that the status of the job is "new" => Inspect rabbitmq queue: % rabbitmq-plugins enable rabbitmq_management % rabbitmqadmin get queue=koha_kohadev-long_tasks You will notice there is a message in the "long_tasks" queue 2. Enqueue a good message a. Remove the change from 1.b b. restart_all c. Enqueue another job => Same error in the log => Both jobs are new => Inspect rabbitmq, there are 2 messages 3. Apply this patch 4. restart_all => Second (good) job is finished => rabbitmq long_tasks queue is empty We cannot mark the first job as done, we have no idea which job it was! QA: Note that this patch is dealing with another problem, not tested in this test plan. If an exception is not correctly caught by the ->process method of the job, we won't crash the worker. The job will be marked as failed. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> |
||
---|---|---|
acqui | ||
admin | ||
api | ||
authorities | ||
basket | ||
bin | ||
C4 | ||
catalogue | ||
cataloguing | ||
circ | ||
clubs | ||
course_reserves | ||
debian | ||
docs | ||
erm | ||
errors | ||
etc | ||
ill | ||
installer | ||
Koha | ||
koha-tmpl | ||
labels | ||
lib/CGI/Session/Serialize | ||
members | ||
misc | ||
offline_circ | ||
opac | ||
patron_lists | ||
patroncards | ||
plugins | ||
pos | ||
recalls | ||
reports | ||
reserve | ||
reviews | ||
rotating_collections | ||
serials | ||
services | ||
skel | ||
suggestion | ||
svc | ||
t | ||
tags | ||
tmp/modified_authorities | ||
tools | ||
virtualshelves | ||
xt | ||
.editorconfig | ||
.eslintrc.json | ||
.gitignore | ||
.htaccess | ||
.mailmap | ||
.perlcriticrc | ||
.proverc.dist | ||
.stylelintrc.json | ||
about.pl | ||
app.psgi | ||
changelanguage.pl | ||
cpanfile | ||
cypress.json | ||
fix-perl-path.PL | ||
gulpfile.js | ||
help.pl | ||
INSTALL | ||
Koha.pm | ||
koha_perl_deps.pl | ||
kohaversion.pl | ||
LICENSE | ||
mainpage.pl | ||
Makefile.PL | ||
MANIFEST.SKIP | ||
package.json | ||
README | ||
README.md | ||
README.robots | ||
rewrite-config.PL | ||
tsconfig.json | ||
webpack.config.js | ||
yarn.lock |
Koha is a free software integrated library system (ILS).
Koha is distributed under the GNU GPL version 3 or later.
Note: Koha does not accept pull requests from git hosting sites.
Note: This project has its own bug tracker, to report a bug or submit a patch visit http://bugs.koha-community.org.
For guidelines on submitting patches for Koha please visit https://wiki.koha-community.org/wiki/SubmitingAPatch
The developers handbook can be found at https://wiki.koha-community.org/wiki/Developer_handbook