]> git.koha-community.org Git - koha.git/commit
Bug 36736: Load plugins at the start of background job processing
authorNick Clemens <nick@bywatersolutions.com>
Thu, 11 Jul 2024 18:08:08 +0000 (18:08 +0000)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Fri, 16 Aug 2024 15:33:41 +0000 (17:33 +0200)
commit44b2c48ace56d05c4b5e730f7f34a56f381fb52a
tree22ef231e688608cf3556d0e5ea7285457b32d53d
parented04035e9ffb00a12f84161dc016b2c307282167
Bug 36736: Load plugins at the start of background job processing

This patch adds a call to get_enabled_plugins before processing background jobs to ensure
that all plugin hooks are loaded and cached

To test:
1 - Install a plugin that adds new objects e.g. the Contracts plugin
    https://github.com/bywatersolutions/fs-koha-plugin-contracts
    or the Koha Advent plugin:
    https://gitlab.com/koha-community/koha-advent/koha-plugin-fancyplugin
2 - Restart all
3 - Tail all your logs
4 - Stage and import a file containing items
5 - Note in the logs
    DBI Exception: DBD::mysql::st execute failed: Lock wait timeout exceeded; try restarting transaction
6 - Apply this patch
7 - Restart all
8 - Stage and import again
9 - Success!

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Koha/BackgroundJob.pm