X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=Civi.php;h=86e72ee847e75d959623c1e297267b3c9c55c3e7;hb=ee58635b82ac5c92bdfc9fbb5c7f9b670ee86a31;hp=3c9d71f929859835f0d6b1f0d94552c240d5d84a;hpb=09accb96e4c820b9e941a49646fba529e5d3939f;p=civicrm-core.git diff --git a/Civi.php b/Civi.php index 3c9d71f929..86e72ee847 100644 --- a/Civi.php +++ b/Civi.php @@ -117,13 +117,14 @@ class Civi { * Specification for a queue. * This is not required for accessing an existing queue. * Specify this if you wish to auto-create the queue or to include advanced options (eg `reset`). - * Example: ['type' => 'SqlParallel'] + * Example: ['type' => 'Sql', 'error' => 'abort'] + * Example: ['type' => 'SqlParallel', 'error' => 'delete'] * Defaults: ['reset'=>FALSE, 'is_persistent'=>TRUE, 'is_autorun'=>FALSE] * @return \CRM_Queue_Queue * @see \CRM_Queue_Service */ public static function queue(string $name, array $params = []): CRM_Queue_Queue { - $defaults = ['reset' => FALSE, 'is_persistent' => TRUE]; + $defaults = ['reset' => FALSE, 'is_persistent' => TRUE, 'status' => 'active']; $params = array_merge($defaults, $params, ['name' => $name]); return CRM_Queue_Service::singleton()->create($params); }