Bugzilla – Attachment 145043 Details for
Bug 32558
Allow background_jobs_worker.pl to process multiple jobs simultaneously up to a limit
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32558: (follow-up) Allow configuration of max processes via env or koha conf
Bug-32558-follow-up-Allow-configuration-of-max-pro.patch (text/plain), 2.26 KB, created by
Kyle M Hall (khall)
on 2023-01-04 19:22:02 UTC
(
hide
)
Description:
Bug 32558: (follow-up) Allow configuration of max processes via env or koha conf
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2023-01-04 19:22:02 UTC
Size:
2.26 KB
patch
obsolete
>From 917d4196ae797e47ce6f5107dfc89a987ca0175e Mon Sep 17 00:00:00 2001 >From: Kyle Hall <kyle@bywatersolutions.com> >Date: Wed, 4 Jan 2023 14:20:50 -0500 >Subject: [PATCH] Bug 32558: (follow-up) Allow configuration of max processes > via env or koha conf > >--- > debian/templates/koha-conf-site.xml.in | 5 +++++ > etc/koha-conf.xml | 5 +++++ > misc/background_jobs_worker.pl | 7 ++++++- > 3 files changed, 16 insertions(+), 1 deletion(-) > >diff --git a/debian/templates/koha-conf-site.xml.in b/debian/templates/koha-conf-site.xml.in >index bdb994c517..187150fa6a 100644 >--- a/debian/templates/koha-conf-site.xml.in >+++ b/debian/templates/koha-conf-site.xml.in >@@ -457,6 +457,11 @@ __END_SRU_PUBLICSERVER__ > <vhost>__MESSAGE_BROKER_VHOST__</vhost> > </message_broker> > >+ <background_jobs_worker> >+ <!-- Max simultaneous processes per worker --> >+ <max_processes>1</max_processes> >+ </background_jobs_worker> >+ > <do_not_remove_cookie>__KEEP_COOKIE__</do_not_remove_cookie> > <do_not_remove_cookie>catalogue_editor_\d+</do_not_remove_cookie> > <!-- Uncomment lines like hereunder to not clear cookies at logout: >diff --git a/etc/koha-conf.xml b/etc/koha-conf.xml >index 3e5623cb96..beb5ccd80c 100644 >--- a/etc/koha-conf.xml >+++ b/etc/koha-conf.xml >@@ -274,6 +274,11 @@ > <vhost></vhost> > </message_broker> > >+ <background_jobs_worker> >+ <!-- Max simultaneous processes per worker --> >+ <max_processes>1</max_processes> >+ </background_jobs_worker> >+ > <do_not_remove_cookie>catalogue_editor_\d+</do_not_remove_cookie> > <!-- Uncomment lines like hereunder to not clear cookies at logout: > The cookie name is case sensitive. >diff --git a/misc/background_jobs_worker.pl b/misc/background_jobs_worker.pl >index 13fb31cc10..a9e14fc94c 100755 >--- a/misc/background_jobs_worker.pl >+++ b/misc/background_jobs_worker.pl >@@ -55,9 +55,14 @@ use Getopt::Long; > use Parallel::ForkManager; > > use Koha::BackgroundJobs; >+use C4::Context; > > my ( $help, @queues ); >-my $max_processes = 1; >+ >+my $max_processes = $ENV{MAX_PROCESSES}; >+$max_processes ||= C4::Context->config('background_jobs_worker')->{max_processes} if C4::Context->config('background_jobs_worker'); >+$max_processes ||= 1; >+ > GetOptions( > 'm|max-processes=i' => \$max_processes, > 'h|help' => \$help, >-- >2.30.2
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 32558
:
144946
|
144947
|
144960
|
144961
|
145043
|
145062
|
145067
|
145900
|
145901
|
145950
|
146020
|
146753
|
146754
|
147784
|
147828