Skip to content
Snippets Groups Projects
Commit 9e3639a6 authored by Lucas Hedding's avatar Lucas Hedding Committed by Lucas Hedding
Browse files

Issue #3099319 by heddn, ressa: Readiness checks results after an attempted...

Issue #3099319 by heddn, ressa: Readiness checks results after an attempted cron upgrade can be wrong
parent 77d9d8ee
No related branches found
No related tags found
No related merge requests found
......@@ -81,6 +81,17 @@ function automatic_updates_cron() {
if (($request_time - $last_check) < 3600) {
return;
}
// Checkers should run before updates because of class caching.
/** @var \Drupal\automatic_updates\Services\NotifyInterface $notify */
$notify = \Drupal::service('automatic_updates.psa_notify');
$notify->send();
/** @var \Drupal\automatic_updates\ReadinessChecker\ReadinessCheckerManagerInterface $checker */
$checker = \Drupal::service('automatic_updates.readiness_checker');
foreach ($checker->getCategories() as $category) {
$checker->run($category);
}
// In-place updates won't function for dev releases of Drupal core.
$dev_core = strpos(\Drupal::VERSION, '-dev') !== FALSE;
/** @var \Drupal\Core\Config\ImmutableConfig $config */
......@@ -124,14 +135,6 @@ function automatic_updates_cron() {
}
}
/** @var \Drupal\automatic_updates\Services\NotifyInterface $notify */
$notify = \Drupal::service('automatic_updates.psa_notify');
$notify->send();
/** @var \Drupal\automatic_updates\ReadinessChecker\ReadinessCheckerManagerInterface $checker */
$checker = \Drupal::service('automatic_updates.readiness_checker');
foreach ($checker->getCategories() as $category) {
$checker->run($category);
}
$state->set('automatic_updates.cron_last_check', \Drupal::time()->getCurrentTime());
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment