From 462ba737003d0d74532546b5b0d0b22a96cbd908 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 0000000000..2755d70c8b --- /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 925c1a4de0..66c7b008f2 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 511341f044..b44075a9b0 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.39.5