UpdateProcessor
class UpdateProcessor implements UpdateProcessorInterface (View source)
Process project update information.
Properties
| protected Config | $updateSettings | The update settings |
|
| protected UpdateFetcherInterface | $updateFetcher | The UpdateFetcher service. |
|
| protected QueueInterface | $fetchQueue | The update fetch queue. |
|
| protected KeyValueStoreExpirableInterface | $tempStore | Update key/value store |
|
| protected KeyValueStoreInterface | $fetchTaskStore | Update Fetch Task Store |
|
| protected KeyValueStoreExpirableInterface | $availableReleasesTempStore | Update available releases store |
|
| protected array | $failed | Array of release history URLs that we have failed to fetch |
|
| protected StateInterface | $stateStore | The state service. |
|
| protected PrivateKey | $privateKey | The private key. |
Methods
Constructs a UpdateProcessor.
Adds a task to the queue for fetching release history data for a project.
Attempts to drain the queue of tasks for release history data to fetch.
Processes a task to fetch available update data for a single project.
Parses the XML of the Drupal release history info files.
Retrieves the number of items in the update fetch queue.
Claims an item in the update fetch queue for processing.
Deletes a finished item from the update fetch queue.
Details
__construct(ConfigFactoryInterface $config_factory, QueueFactory $queue_factory, UpdateFetcherInterface $update_fetcher, StateInterface $state_store, PrivateKey $private_key, KeyValueFactoryInterface $key_value_factory, KeyValueFactoryInterface $key_value_expirable_factory)
Constructs a UpdateProcessor.
createFetchTask(array $project)
Adds a task to the queue for fetching release history data for a project.
We only create a new fetch task if there's no task already in the queue for this particular project (based on 'update_fetch_task' key-value collection).
fetchData()
Attempts to drain the queue of tasks for release history data to fetch.
bool
processFetchTask(array $project)
Processes a task to fetch available update data for a single project.
Once the release history XML data is downloaded, it is parsed and saved in an entry just for that project.
protected array
parseXml(string $raw_xml)
Parses the XML of the Drupal release history info files.
int
numberOfQueueItems()
Retrieves the number of items in the update fetch queue.
bool|object
claimQueueItem()
Claims an item in the update fetch queue for processing.
deleteQueueItem(object $item)
Deletes a finished item from the update fetch queue.