From e54c22cc114c70f90bb7d23d47dff2a3fbe12a5e Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Thu, 12 Sep 2024 11:09:11 -0300 Subject: [PATCH] Bug 35655: Add 'JobsNotificationMethod' system preference Signed-off-by: Kyle M Hall Signed-off-by: Martin Renvoize --- .../data/mysql/atomicupdate/bug_35655.pl | 22 +++++++++++++++++++ installer/data/mysql/mandatory/sysprefs.sql | 1 + .../en/modules/admin/preferences/admin.pref | 9 ++++++++ 3 files changed, 32 insertions(+) create mode 100755 installer/data/mysql/atomicupdate/bug_35655.pl diff --git a/installer/data/mysql/atomicupdate/bug_35655.pl b/installer/data/mysql/atomicupdate/bug_35655.pl new file mode 100755 index 00000000000..2755d70c8bc --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_35655.pl @@ -0,0 +1,22 @@ +use Modern::Perl; +use Koha::Installer::Output qw(say_warning say_failure say_success say_info); + +return { + bug_number => "35655", + description => "Add a way to disable RabbitMQ", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + $dbh->do( + q{ + INSERT IGNORE INTO systempreferences + (`variable`, `value`, `options`, `explanation`, `type` ) + VALUES + ('JobsNotificationMethod', 'STOMP', 'polling|STOMP', 'Define the preferred job worker notification method', 'Choice') + } + ); + + say $out "Added new system preference 'JobsNotificationMethod'"; + }, +}; diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index 925c1a4de03..66c7b008f21 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -358,6 +358,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('itemBarcodeInputFilter','','whitespace|T-prefix|cuecat|libsuite8|EAN13','If set, allows specification of a item barcode input filter','Choice'), ('itemcallnumber','',NULL,'The MARC field/subfield that is used to calculate the itemcallnumber (Dewey would be 082ab or 092ab; LOC would be 050ab or 090ab) could be 852hi from an item record','free'), ('ItemsDeniedRenewal','','','This syspref allows to define custom rules for denying renewal of specific items.','Textarea'), +('JobsNotificationMethod','STOMP','polling|STOMP','Define the preferred job worker notification method','Choice'), ('KohaAdminEmailAddress','root@localhost','','Define the email address where patron modification requests are sent','free'), ('KohaManualBaseURL','https://koha-community.org/manual/','','Where is the Koha manual/documentation located?','Free'), ('KohaManualLanguage','en','en|ar|cs|de|es|fr|it|pt_BR|tr|zh_TW','What is the language of the online manual you want to use?','Choice'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref index 511341f0444..b44075a9b01 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref @@ -189,6 +189,15 @@ Administration: None: "None" Common Name: Common Name emailAddress: emailAddress + Jobs: + - + - "Use " + - pref: JobsNotificationMethod + default: STOMP + choices: + STOMP: "STOMP" + polling: "polling" + - as the preferred job worker notification method. STOMP (default) requires RabbitMQ running. Polling will be used as a fallback if RabbitMQ is not accessible. Google OpenID Connect: - - "Use Google OpenID Connect login in the OPAC: " -- 2.46.1