Commit fc35679d authored by alexpott's avatar alexpott

Issue #2014037 by hussainweb, kgoel: Replace drupal_container() with...

Issue #2014037 by hussainweb, kgoel: Replace drupal_container() with Drupal::keyValue() in the update module.
parent 6c5cc0c2
......@@ -193,7 +193,7 @@ function _update_process_fetch_task($project) {
// Now that we processed the fetch task for this project, clear out the
// record for this task so we're willing to fetch again.
drupal_container()->get('keyvalue')->get('update_fetch_task')->delete($project_name);
Drupal::keyValue('update_fetch_task')->delete($project_name);
return $success;
}
......@@ -245,12 +245,12 @@ function _update_refresh() {
function _update_create_fetch_task($project) {
$fetch_tasks = &drupal_static(__FUNCTION__, array());
if (empty($fetch_tasks)) {
$fetch_tasks = drupal_container()->get('keyvalue')->get('update_fetch_task')->getAll();
$fetch_tasks = Drupal::keyValue('update_fetch_task')->getAll();
}
if (empty($fetch_tasks[$project['name']])) {
$queue = Drupal::queue('update_fetch_tasks');
$queue->createItem($project);
drupal_container()->get('keyvalue')->get('update_fetch_task')->set($project['name'], $project);
Drupal::keyValue('update_fetch_task')->set($project['name'], $project);
$fetch_tasks[$project['name']] = REQUEST_TIME;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment