]> git.koha-community.org Git - koha.git/commit
Bug 33044: Return job id if there is no connection to rabbit
authorNick Clemens <nick@bywatersolutions.com>
Wed, 22 Feb 2023 18:13:35 +0000 (18:13 +0000)
committerArthur Suzuki <arthur.suzuki@biblibre.com>
Wed, 29 Mar 2023 12:53:57 +0000 (14:53 +0200)
commitb5a3c687377abcffa98d2312389009e13f44087a
tree4c03a5f9eb7a823c8dbe054ebf3bccb0df34a955
parent2513ca383463ea5be7bacaef6f10376bfe690ccf
Bug 33044: Return job id if there is no connection to rabbit

This patch simply ensures we return the job id even if we couldn't send
the job to rabbit.

To test:
1 - In KTD: sudo service rabbitmq-server stop
2 - sudo koha-worker --stop kohadev; sudo koha-worker --queue long_tasks --stop kohadev
3 - In staff client enqueue a batch item modification - note the link to view the enqueued job has no id in the url and takes you to the main background jobs viewer
4 - Run t/db_dependent/Koha/BackgroundJob.t and notice that it fails.
5 - Apply patch
6 - Restart all
7 - Enqueue a new batch item modification
8 - Confirm the link works and has the correct id
9 - Run t/db_dependent/Koha/BackgroundJob.t; it should pass now.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b93b6f3ddebdbcb53b435c1b9d7e64e235688d2f)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 99454c388599a9f3eced976f913ead44b893d5d2)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ff7b0a0cddf19b02ccf44ee4980d9aeafcede26b)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Koha/BackgroundJob.pm