Skip to content
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

(REF) CRM_Queue_Queue_* - Retain a copy of $queueSpec #22797

Merged
merged 1 commit into from
Feb 19, 2022

Conversation

totten
Copy link
Member

@totten totten commented Feb 19, 2022

Overview

Queue objects are constructed with an array-based specification ($queueSpec). This patch prepares for defining and using more queue-level properties.

Before

Suppose you want to define a queue-level property like retry_interval. It would make sense to add this to the queue-spec:

$queue = CRM_Queue_Service::singleton()->create([
  'name' => 'foo',
  'type' => 'bar',
  'retry_interval' => 600,
]);

However, the retry_interval would be forgotten - so when it came to time to schedule a retry, the value is unavailable.

After

You can get any field from the $queueSpec, eg

$queue->getSpec('retry_interval');

@civibot civibot bot added the master label Feb 19, 2022
@civibot
Copy link

civibot bot commented Feb 19, 2022

(Standard links)

@colemanw colemanw merged commit ba118f1 into civicrm:master Feb 19, 2022
@totten totten deleted the master-queue-spec branch February 19, 2022 04:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants