function UpdateProcessor::fetchData

Same name in other branches
  1. 8.9.x core/modules/update/src/UpdateProcessor.php \Drupal\update\UpdateProcessor::fetchData()
  2. 10 core/modules/update/src/UpdateProcessor.php \Drupal\update\UpdateProcessor::fetchData()
  3. 11.x core/modules/update/src/UpdateProcessor.php \Drupal\update\UpdateProcessor::fetchData()

Overrides UpdateProcessorInterface::fetchData

File

core/modules/update/src/UpdateProcessor.php, line 134

Class

UpdateProcessor
Process project update information.

Namespace

Drupal\update

Code

public function fetchData() {
    $end = time() + $this->updateSettings
        ->get('fetch.timeout');
    if ($this->fetchQueue
        ->numberOfItems()) {
        // Delete any stored project data as that needs refreshing when
        // update_calculate_project_data() is called.
        $this->tempStore
            ->delete('update_project_data');
    }
    while (time() < $end && ($item = $this->fetchQueue
        ->claimItem())) {
        $this->processFetchTask($item->data);
        $this->fetchQueue
            ->deleteItem($item);
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.