Bug 32561: Prevent worker to run with unecessary modules in memory
Regression of bug 28413, bug 30410 added a "use Koha::Plugins" statement at the top of Koha::BackgroundJob, and so all Koha module are loaded by the worker on startup.
See bug 28413 for more info
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.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 a85a6bc4d4
)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This commit is contained in:
parent
8a28f6e259
commit
16ecdc2f8e
1 changed files with 1 additions and 1 deletions
|
@ -25,7 +25,6 @@ use Try::Tiny qw( catch try );
|
|||
use C4::Context;
|
||||
use Koha::DateUtils qw( dt_from_string );
|
||||
use Koha::Exceptions;
|
||||
use Koha::Plugins;
|
||||
use Koha::Exceptions::BackgroundJob;
|
||||
|
||||
use base qw( Koha::Object );
|
||||
|
@ -442,6 +441,7 @@ sub plugin_types_to_classes {
|
|||
my ($self) = @_;
|
||||
|
||||
unless ( exists $self->{_plugin_mapping} ) {
|
||||
require Koha::Plugins;
|
||||
my @plugins = Koha::Plugins->new()->GetPlugins( { method => 'background_tasks', } );
|
||||
|
||||
foreach my $plugin (@plugins) {
|
||||
|
|
Loading…
Reference in a new issue