[Koha-bugs] [Bug 33044] BackgroundJob enqueue does not return the job id if rabbit is unreachable

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Mar 3 09:21:40 CET 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33044

Marcel de Rooy <m.de.rooy at rijksmuseum.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #147670|0                           |1
        is obsolete|                            |

--- Comment #4 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
Created attachment 147682
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=147682&action=edit
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 at davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list