Bugzilla – Attachment 174150 Details for
Bug 38384
General fix for plugins breaking database transactions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38384: Trigger plugin modules loading as soon as possible in Koha
Bug-38384-Trigger-plugin-modules-loading-as-soon-a.patch (text/plain), 1.46 KB, created by
Kyle M Hall (khall)
on 2024-11-07 11:53:53 UTC
(
hide
)
Description:
Bug 38384: Trigger plugin modules loading as soon as possible in Koha
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2024-11-07 11:53:53 UTC
Size:
1.46 KB
patch
obsolete
>From 0f8750cbbf212bd2b1106c1d3a435dc7de7272a6 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 7 Nov 2024 06:53:39 -0500 >Subject: [PATCH] Bug 38384: Trigger plugin modules loading as soon as possible > in Koha > >--- > C4/Context.pm | 5 +++++ > Koha/BackgroundJob.pm | 6 ------ > 2 files changed, 5 insertions(+), 6 deletions(-) > >diff --git a/C4/Context.pm b/C4/Context.pm >index 8d49feda7c4..3f009603fe1 100644 >--- a/C4/Context.pm >+++ b/C4/Context.pm >@@ -21,6 +21,11 @@ use Modern::Perl; > > use vars qw($AUTOLOAD $context); > BEGIN { >+ # Calling get_enabled_plugins here esnures that all plugin >+ # modules are loaded before use and will not trigger >+ # a database connection reset >+ Koha::Plugins->get_enabled_plugins(); >+ > if ( $ENV{'HTTP_USER_AGENT'} ) { # Only hit when plack is not enabled > > # Redefine multi_param if cgi version is < 4.08 >diff --git a/Koha/BackgroundJob.pm b/Koha/BackgroundJob.pm >index 4914971dbfa..a3e8d5dbac4 100644 >--- a/Koha/BackgroundJob.pm >+++ b/Koha/BackgroundJob.pm >@@ -176,12 +176,6 @@ sub process { > > return {} if ref($self) ne 'Koha::BackgroundJob'; > >- # Our background jobs are called in forked processes >- # to ensure we have all plugin hooks and data we call >- # get_enabled_plugins at the star of processing >- # to populate the cache >- Koha::Plugins->get_enabled_plugins(); >- > my $derived_class = $self->_derived_class; > > $args ||= {}; >-- >2.39.5 (Apple Git-154)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 38384
: 174150 |
174264
|
174265
|
174280
|
174282