• totten's avatar
    Civi::queue() - Add support for 'template' queues · b656ba01
    totten authored
    Suppose you are in the habit of making separate queue-instances for
    different batches of work.  However, you want to allow the sysadmin to
    configure options like `type`, `batch_limit`, and `retry_interval`.
    Solution: Make a template
    // Use the API to register a template, eg
      'name' => 'template-name',
      'is_template' => TRUE,
    // Later, create a queue from the template
    $q = Civi::queue('new-queue', ['template' => 'template-name']);