Queue.retry_limit - Set explicit default to 0. Update comments/docs.
authorTim Otten <totten@civicrm.org>
Tue, 1 Mar 2022 02:08:29 +0000 (18:08 -0800)
committerTim Otten <totten@civicrm.org>
Tue, 1 Mar 2022 02:12:31 +0000 (18:12 -0800)
CRM/Queue/DAO/Queue.php
CRM/Queue/Service.php
CRM/Upgrade/Incremental/php/FiveFortyEight.php
xml/schema/Queue/Queue.xml

index 557116317b8cd3e826a3f65e40a30e6fc122cf6e..2d8002f5517e1deed811b2961bfbad0d87de5567 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Generated from xml/schema/CRM/Queue/Queue.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:e6121756b8122fe6b2bbb1287548f07e)
+ * (GenCodeChecksum:3b50eca7549430727237a4b2e295df1f)
  */
 
 /**
@@ -83,7 +83,7 @@ class CRM_Queue_DAO_Queue extends CRM_Core_DAO {
   public $lease_time;
 
   /**
-   * Number of permitted retries. Decreases with each retry. Zero (0) to disable. Null for system default.
+   * Number of permitted retries. Set to zero (0) to disable.
    *
    * @var int|string
    *   (SQL type: int)
@@ -237,9 +237,10 @@ class CRM_Queue_DAO_Queue extends CRM_Core_DAO {
           'name' => 'retry_limit',
           'type' => CRM_Utils_Type::T_INT,
           'title' => ts('Retry Limit'),
-          'description' => ts('Number of permitted retries. Decreases with each retry. Zero (0) to disable. Null for system default.'),
-          'required' => FALSE,
+          'description' => ts('Number of permitted retries. Set to zero (0) to disable.'),
+          'required' => TRUE,
           'where' => 'civicrm_queue.retry_limit',
+          'default' => '0',
           'table_name' => 'civicrm_queue',
           'entity' => 'Queue',
           'bao' => 'CRM_Queue_BAO_Queue',
index 58079115058fcc7d8abecd9facd05fbc1eac06b6..2a9815ecfcf396a9e8931d126a115c92d3d2d667 100644 (file)
@@ -92,7 +92,7 @@ class CRM_Queue_Service {
    *     automatically via `hook_civicrm_queueRun_{$runner}`
    *   - batch_limit: int, Maximum number of items in a batch.
    *   - lease_time: int, When claiming an item (or batch of items) for work, how long should the item(s) be reserved. (Seconds)
-   *   - retry_limit: int, Number of permitted retries. Decreases with each retry. Zero (0) to disable. Null for system default.
+   *   - retry_limit: int, Number of permitted retries. Set to zero (0) to disable.
    *   - retry_interval: int, Number of seconds to wait before retrying a failed execution.
    * @return CRM_Queue_Queue
    */
index 3cadf4fea3f9917bc62d42f9313f90fcd6ebfdaa..18f112597f1a1c3d0ef3d9d8062f8f235ff2f9d1 100644 (file)
@@ -41,7 +41,7 @@ class CRM_Upgrade_Incremental_php_FiveFortyEight extends CRM_Upgrade_Incremental
       "int unsigned NOT NULL DEFAULT 3600 COMMENT 'When claiming an item (or batch of items) for work, how long should the item(s) be reserved. (Seconds)'"
     );
     $this->addTask('Add "retry_limit" to "civicrm_queue"', 'addColumn', 'civicrm_queue', 'retry_limit',
-      "int NULL COMMENT 'Number of permitted retries. Decreases with each retry. Zero (0) to disable. Null for system default.'"
+      "int NOT NULL DEFAULT 0 COMMENT 'Number of permitted retries. Set to zero (0) to disable.'"
     );
     $this->addTask('Add "retry_interval" to "civicrm_queue"', 'addColumn', 'civicrm_queue', 'retry_interval',
       "int NULL COMMENT 'Number of seconds to wait before retrying a failed execution.'"
index 1f192a6ba67a4e16a0f81a6e7cb52fc0cf3da57c..d44b917e75d7f8f380b1d2095da9caf7a6359859 100644 (file)
   <field>
     <name>retry_limit</name>
     <title>Retry Limit</title>
-    <comment>Number of permitted retries. Decreases with each retry. Zero (0) to disable. Null for system default.</comment>
+    <comment>Number of permitted retries. Set to zero (0) to disable.</comment>
     <type>int</type>
-    <required>false</required>
+    <required>true</required>
+    <default>0</default>
     <html>
       <type>Text</type>
     </html>