Change record status: 
Project: 
Introduced in branch: 
8.0.x
Description: 

Implementations of hook_queue_info() are replaced with an annotated class to reside in \Drupal\*\Plugin\QueueWorker, annotated with Drupal\Core\Annotation\QueueWorker, implementing the interface of Drupal\Core\Queue\QueueWorkerInterface

Drupal 7:

function aggregator_cron_queue_info() {
  $queues['aggregator_feeds'] = array(
    'title' => t('Aggregator refresh'),
    'worker callback' => 'aggregator_refresh',
    'cron' => array(
      'time' => 60,
    ),
  );
  return $queues;
}

Previously in Drupal 8, aggregator_refresh($feed) was replaced by a direct call to $feed->refreshItems(), and hook_cron_queue_info()/hook_cron_queue_info_alter() were renamed hook_queue_info()/hook_queue_info_alter().

Drupal 8:


/**
 * @file
 * Contains \Drupal\aggregator\Plugin\QueueWorker\AggregatorRefresh.
 */

namespace Drupal\aggregator\Plugin\QueueWorker;

use Drupal\aggregator\FeedInterface;
use Drupal\Core\Queue\QueueWorkerBase;

/**
 * @QueueWorker(
 *   id = "aggregator_feeds",
 *   title = @Translation("Aggregator refresh"),
 *   cron = {"time" = 60}
 * )
 */
class AggregatorRefresh extends QueueWorkerBase {

  /**
   * {@inheritdoc}
   */
  public function processItem($data) {
    if ($data instanceof FeedInterface) {
      $data->refreshItems();
    }
  }

}
Impacts: 
Module developers
Updates Done (doc team, etc.)
Online documentation: 
Not done
Theming guide: 
Not done
Module developer documentation: 
Not done
Examples project: 
Not done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Other: 
Other updates done