From 82a7f74580e2d0d5197766666bccd7273a2c96ee Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Fri, 3 Jun 2022 21:44:35 -0700 Subject: [PATCH] Add experimental setting `enableBackgroundQueue` --- CRM/Admin/Form/Setting/Miscellaneous.php | 1 + settings/Core.setting.php | 14 ++++++++++++++ templates/CRM/Admin/Form/Setting/Miscellaneous.tpl | 6 ++++++ 3 files changed, 21 insertions(+) diff --git a/CRM/Admin/Form/Setting/Miscellaneous.php b/CRM/Admin/Form/Setting/Miscellaneous.php index dfe75c761f..722fef9cda 100644 --- a/CRM/Admin/Form/Setting/Miscellaneous.php +++ b/CRM/Admin/Form/Setting/Miscellaneous.php @@ -26,6 +26,7 @@ class CRM_Admin_Form_Setting_Miscellaneous extends CRM_Admin_Form_Setting { 'contact_undelete' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'empoweredBy' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'logging' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, + 'enableBackgroundQueue' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'maxFileSize' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'doNotAttachPDFReceipt' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'recordGeneratedLetters' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, diff --git a/settings/Core.setting.php b/settings/Core.setting.php index 4992ef8c90..c52fe9b1bc 100644 --- a/settings/Core.setting.php +++ b/settings/Core.setting.php @@ -239,6 +239,20 @@ return [ 'description' => NULL, 'help_text' => NULL, ], + 'enableBackgroundQueue' => [ + 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', + 'name' => 'enableBackgroundQueue', + 'type' => 'Boolean', + 'quick_form_type' => 'YesNo', + 'default' => 0, + 'add' => '5.51', + 'title' => ts('Background Queues'), + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => ts('EXPERIMENTAL: %1', [1 => ts('If enabled, some operations will be transferred to background workers. This requires configuring a background service.')]), + 'help_text' => NULL, + ], 'defaultExternUrl' => [ 'group_name' => 'CiviCRM Preferences', 'group' => 'core', diff --git a/templates/CRM/Admin/Form/Setting/Miscellaneous.tpl b/templates/CRM/Admin/Form/Setting/Miscellaneous.tpl index bb7fc8892c..25df8e2b46 100644 --- a/templates/CRM/Admin/Form/Setting/Miscellaneous.tpl +++ b/templates/CRM/Admin/Form/Setting/Miscellaneous.tpl @@ -41,6 +41,12 @@ {/if} + + {$form.enableBackgroundQueue.label} + {$form.enableBackgroundQueue.html}
+ {$setting_descriptions.enableBackgroundQueue} + + {$form.doNotAttachPDFReceipt.label} {$form.doNotAttachPDFReceipt.html}
-- 2.25.1