You are here

public function FeedStorage::getFeedIdsToRefresh in MongoDB 8

Returns the fids of feeds that need to be refreshed.

Return value

array A list of feed ids to be refreshed.

Overrides FeedStorageInterface::getFeedIdsToRefresh

File

mongodb_aggregator/src/Entity/FeedStorage.php, line 19
Contains Drupal\mongodb\Entity\FeedStorageController.

Class

FeedStorage

Namespace

Drupal\mongodb_aggregator\Entity

Code

public function getFeedIdsToRefresh() {
  $find['values']['$elemMatch'] = array(
    'queued' => 0,
    'checked_plus_refresh' => array(
      '$lt' => REQUEST_TIME,
    ),
    'refresh' => array(
      '$ne' => AGGREGATOR_CLEAR_NEVER,
    ),
  );
  return array_keys(iterator_to_array($this->mongo
    ->get('entity.aggregator_feed')
    ->find(array(
    $find,
  ), array(
    '_id' => TRUE,
  ))));
}