Browse Source

Bug 32573: Send ACK message to RabbitMQ before handling the job

Splitting off this functionality from bug 32558. This is the comment that started this discussion: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32558#c15

From the O'Reilly book Mobile and Web Messaging:

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b3c5bd02e1)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 0f7b8008f7)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
22.05.x
Kyle Hall 1 year ago
committed by Lucas Gass
parent
commit
2fd293fa6e
  1. 2
      misc/background_jobs_worker.pl

2
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 });

Loading…
Cancel
Save