Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 297680

Allow a queue worker callback to be a class method

$
0
0

As we turn more and more to OOP this makes sense, doesnt it?:)

drupal_cron_run() right now:

<?php
      $function
= $info['worker callback'];
     
$end = time() + (isset($info['cron']['time']) ? $info['cron']['time'] : 15);
     
$queue = Drupal::queue($queue_name);
      while (
time() < $end && ($item = $queue->claimItem())) {
       
$function($item->data);
       
$queue->deleteItem($item);
      }
?>

Coming from #1972260: Convert aggregator_admin_refresh_feed to a new style controller


Viewing all articles
Browse latest Browse all 297680

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>