-
-
Notifications
You must be signed in to change notification settings - Fork 825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Civi::queue() - Add support for 'template' queues #23679
Civi::queue() - Add support for 'template' queues #23679
Conversation
(Standard links)
|
I think is_template is more correct - but there is precedent for the status method - we do that in Contribution - but in fact I think we do BOTH there because we felt that was an especially risky entity. I'm not opposed to the easy route - but suspect we might need to do another alter in which case that might tip it away from easer |
Overview -------- 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 After ----- ```php // Use the API to register a template, eg \Civi\Api4\Queue::create()->setValues([ 'name' => 'template-name', 'is_template' => TRUE, ... ])->execute(); // Later, create a queue from the template $q = Civi::queue('new-queue', ['template' => 'template-name']); ```
f284033
to
b656ba0
Compare
@eileenmcnaughton Converted patch from |
Eileen requested, and it's easiest to add now, and it seems safe+consistent.
test this please |
1 similar comment
test this please |
fail is unrelated - fix is in #23751 |
Overview
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
, andretry_interval
.Solution: Make a template
After
Comments
I'm ambivalent about how to mark a template - eg:
status=>template
is_template=>1