(NFC) Civi\Api4\Queue - Clarify quantity for claimItems/runItems
authorTim Otten <totten@civicrm.org>
Fri, 29 Sep 2023 23:40:20 +0000 (16:40 -0700)
committerTim Otten <totten@civicrm.org>
Sat, 30 Sep 2023 02:21:40 +0000 (19:21 -0700)
Civi/Api4/Queue.php

index f50486245719f06f473aa42873fa2c45d734a649..1fe7aacdcc15a11ff13b1c0658bc992e5e847c46 100644 (file)
@@ -40,10 +40,14 @@ class Queue extends \Civi\Api4\Generic\DAOEntity {
   }
 
   /**
-   * Claim an item from the queue. Returns zero or one items.
+   * Claim some items from the queue. Returns zero or more items.
    *
    * Note: This is appropriate for persistent, auto-run queues.
    *
+   * The number of items depends on the specific queue. Most notably, batch sizes are
+   * influenced by queue-driver support (`BatchQueueInterface`) and queue-configuration
+   * (`civicrm_queue.batch_limit`).
+   *
    * @param bool $checkPermissions
    * @return \Civi\Api4\Action\Queue\ClaimItems
    */
@@ -53,10 +57,14 @@ class Queue extends \Civi\Api4\Generic\DAOEntity {
   }
 
   /**
-   * Run an item from the queue.
+   * Run some items from the queue.
    *
    * Note: This is appropriate for persistent, auto-run queues.
    *
+   * The number of items depends on the specific queue. Most notably, batch sizes are
+   * influenced by queue-driver support (`BatchQueueInterface`) and queue-configuration
+   * (`civicrm_queue.batch_limit`).
+   *
    * @param bool $checkPermissions
    * @return \Civi\Api4\Action\Queue\RunItems
    */