Now we have moved to psr-0 and make heavy use of classes/namespaces etc... it would make sense to allow the 'worker calback' key in hook_queue_info to process any php callable and not just a function.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

aspilicious’s picture

Status: Needs review » Reviewed & tested by the community

Must come back green!

chx’s picture

Agreed.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work

We should update the docs too then... in system.api.php...

 *   An associative array where the key is the queue name and the value is
 *   again an associative array. Possible keys are:
 *   - 'worker callback': The name of the function to call. It will be called
 *     with one argument, the item created via
 *     Drupal\Core\Queue\QueueInterface::createItem() in hook_cron().
damiankloip’s picture

Status: Needs work » Needs review
FileSize
1.14 KB
1.83 KB

Yep, good point. Let's update the actual docs.

damiankloip’s picture

This still applies fine, and is a really small change - any chance this can get in?

dawehner’s picture

Status: Needs review » Needs work

On views we had an issue with call_user_func on php 5.4, see #1933290: Saving anything on handlers isn't stored properly
so call_user_func_array should be used instead. In this case it works fine as data is an object, but for just arrays in the queue we have a problem

damiankloip’s picture

Status: Needs work » Needs review
FileSize
563 bytes
1.85 KB

That's a very good point.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Let's get that.

ParisLiakos’s picture

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 5ecc704 and pushed to 8.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.