Bugzilla – Attachment 145608 Details for
Bug 32573
background_jobs_worker.pl should ACK a message before it forks and runs the job
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32573: Send ACK message to RabbitMQ before handling the job
Bug-32573-Send-ACK-message-to-RabbitMQ-before-hand.patch (text/plain), 1.52 KB, created by
Marcel de Rooy
on 2023-01-24 12:25:06 UTC
(
hide
)
Description:
Bug 32573: Send ACK message to RabbitMQ before handling the job
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2023-01-24 12:25:06 UTC
Size:
1.52 KB
patch
obsolete
>From 458ac33752c923942576c715391831d922601522 Mon Sep 17 00:00:00 2001 >From: Kyle Hall <kyle@bywatersolutions.com> >Date: Thu, 5 Jan 2023 11:35:42 -0500 >Subject: [PATCH] Bug 32573: Send ACK message to RabbitMQ before handling the > job >Content-Type: text/plain; charset=utf-8 > >Splitting off this functionality from bug 32558. > >In summary, we should be sending back ACK messages as soon as we've successfully processed >( e.g. read and decoded the data ) of a frame. Only then should we process it. > >Test plan: >1) Apply this patch >2) Launch background_jobs_worker.pl >3) Note no changes in background job processing > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > misc/background_jobs_worker.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/misc/background_jobs_worker.pl b/misc/background_jobs_worker.pl >index a9eda51681..8a379d60ea 100755 >--- a/misc/background_jobs_worker.pl >+++ b/misc/background_jobs_worker.pl >@@ -100,8 +100,8 @@ while (1) { > # It could work in a first step, but then we will want to handle job that will be created from the message received > my $job = Koha::BackgroundJobs->find($args->{job_id}); > >+ $conn->ack( { frame => $frame } ); # Acknowledge the message was received > process_job( $job, $args ); >- $conn->ack( { frame => $frame } ); # FIXME depending on success? > > } else { > my $jobs = Koha::BackgroundJobs->search({ status => 'new', queue => \@queues }); >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 32573
:
145066
|
145594
|
145595
|
145608
|
145612