]> git.koha-community.org Git - koha.git/commit
Bug 32305: Worker should ignore wrong status or queue in MQ mode
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tue, 17 Oct 2023 14:43:32 +0000 (14:43 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Wed, 25 Oct 2023 21:50:56 +0000 (11:50 -1000)
commit20b0687b74f923a65b5db0bee2a8a4d39af4e849
tree8267ffabffa8b53b05059390af234bf6b204d438
parent8a945f3e811cfb39c0a0212554b1adfca2b041bb
Bug 32305: Worker should ignore wrong status or queue in MQ mode

MQ mode: The worker has seen that MQ is running and consumes messages
instead of polling db only.

Test plan:
Stop worker for long tasks.
Make sure that Rabbit MQ runs.
Stage a file. (This adds a long task.)
Goto staff view of jobs and cancel this job.
Check if job is still in MQ with rabbitmqctl list_queues.
Now start worker for long tasks.
Check if job is gone in MQ with rabbitmqctl list_queues.
And check logfile for the adjusted warning like:
  [WARN] Job 5 not found, or has wrong status/queue main:: /usr/share/koha/misc/workers/background_jobs_worker.pl (134)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Removed queue from query at MQ side. Discussed on IRC.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f1edd8fe77897c0f293f3d11ac20fd9ddb8bde8f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
misc/workers/background_jobs_worker.pl