Skip to content

Commit

Permalink
Queue.retry_limit - Set explicit default to 0. Update comments/docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
totten committed Mar 1, 2022
1 parent af38636 commit 991e266
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
9 changes: 5 additions & 4 deletions CRM/Queue/DAO/Queue.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* Generated from xml/schema/CRM/Queue/Queue.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
* (GenCodeChecksum:e6121756b8122fe6b2bbb1287548f07e)
* (GenCodeChecksum:3b50eca7549430727237a4b2e295df1f)
*/

/**
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -237,9 +237,10 @@ public static function &fields() {
'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',
Expand Down
2 changes: 1 addition & 1 deletion CRM/Queue/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public function __construct() {
* 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
*/
Expand Down
2 changes: 1 addition & 1 deletion CRM/Upgrade/Incremental/php/FiveFortyEight.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function upgrade_5_48_alpha1($rev): void {
"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 NULL 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.'"
Expand Down
5 changes: 3 additions & 2 deletions xml/schema/Queue/Queue.xml
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,10 @@
<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>
Expand Down

0 comments on commit 991e266

Please sign in to comment.