From 2cc92c70ef55d166baa5f7acf8348ff93e10370f Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Fri, 22 Sep 2023 14:43:47 -0700 Subject: [PATCH] The Battle of the Synonyms was put on-hold. With the recent update, it fires a hook, and the hook-data describes the queue-status as "deferred". But the setting which drives it is called "queue_suspended". Which word is better? On reflection... neither! In CiviMail, there's some existing functionality where you can "pause" a mail-blast. And it's basically the same thing: we keep the queue-data, but we tell the workers to temporarily refrain from execution. And that's fine. "Pausing" sounds less scary... --- CRM/Queue/Queue.php | 4 ++-- settings/Core.setting.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CRM/Queue/Queue.php b/CRM/Queue/Queue.php index 09a654adce..c17977c530 100644 --- a/CRM/Queue/Queue.php +++ b/CRM/Queue/Queue.php @@ -64,11 +64,11 @@ abstract class CRM_Queue_Queue { // Queues work with concurrent processes. We want to make sure status info is up-to-date (never cached). $status = CRM_Core_DAO::getFieldValue('CRM_Queue_DAO_Queue', $this->_name, 'status', 'name', TRUE); if ($status === 'active') { - $suspend = CRM_Core_DAO::singleValueQuery('SELECT value FROM civicrm_setting WHERE name = "queue_suspended" AND domain_id = %1', [ + $suspend = CRM_Core_DAO::singleValueQuery('SELECT value FROM civicrm_setting WHERE name = "queue_paused" AND domain_id = %1', [ 1 => [CRM_Core_BAO_Domain::getDomain()->id, 'Positive'], ]); if (!empty(CRM_Utils_String::unserialize($suspend))) { - $status = 'deferred'; + $status = 'paused'; } } $event = GenericHookEvent::create([ diff --git a/settings/Core.setting.php b/settings/Core.setting.php index 26cc623c48..b010fc36b5 100644 --- a/settings/Core.setting.php +++ b/settings/Core.setting.php @@ -1201,8 +1201,8 @@ return [ 'description' => ts('How long should HTTP requests through Guzzle application run for in seconds'), 'help_text' => ts('Set the number of seconds http requests should run for before terminating'), ], - 'queue_suspended' => [ - 'name' => 'queue_suspended', + 'queue_paused' => [ + 'name' => 'queue_paused', 'type' => 'Boolean', 'default' => FALSE, 'html_type' => 'yesno', -- 2.25.1