Bug 30172: Prevent race condition when enqueuing a new task
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 24 Feb 2022 09:41:16 +0000 (10:41 +0100)
committerAndrew Fuerste-Henry <andrew@bywatersolutions.com>
Fri, 22 Apr 2022 14:30:24 +0000 (14:30 +0000)
commitec67db56f155a092cdb6d0b0ddce7abc9956ace0
treeb5031f0980bf80ca420310927909d45a3f69f324
parent58ab6d243b41804851d4c8f79729efea2ac62ea0
Bug 30172: Prevent race condition when enqueuing a new task

As we are sending the job to the rabbitmq before in the transaction, the
worker can receive the job to process before the transaction committed.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 40a329474486ffdef145466ddb66d65060d656ac)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Koha/BackgroundJob.pm
koha-tmpl/intranet-tmpl/prog/en/modules/admin/background_jobs.tt