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...
// 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([
'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',