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>
(cherry picked from commit 2fd293fa6e)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
This commit is contained in:
Kyle Hall 2023-01-05 11:35:42 -05:00 committed by Arthur Suzuki
parent 1ff7c6bdcd
commit 36772abfbe
1 changed files with 1 additions and 1 deletions

View File

@ -64,8 +64,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' });