Skip to content
Snippets Groups Projects

Issue #3259814: If a Cron update fails after it has started the stage should be destroyed

Merged Issue #3259814: If a Cron update fails after it has started the stage should be destroyed
Merged Adam G-H requested to merge issue/automatic_updates-3259814:3259814-if-a-cron into 8.x-2.x
Compare and
2 files
+ 159
9
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 10
2
@@ -113,7 +113,6 @@ class CronUpdater extends Updater {
]);
$this->stage();
$this->apply();
$this->destroy();
}
catch (StageValidationException $e) {
$this->logger->error(static::formatValidationException($e));
Please register or sign in to reply
@@ -123,7 +122,16 @@ class CronUpdater extends Updater {
$this->logger->error($e->getMessage());
return;
}
finally {
// If an error occurred during pre-create, the stage will still be
// available, which means we shouldn't try to destroy it (since the stage
// must be claimed before it can be destroyed). In all other situations,
// we want to destroy the stage. If a pre-destroy event listener throws an
// exception or flags an error, don't try to catch it.
if (!$this->isAvailable()) {
$this->destroy();
}
}
$this->logger->info(
'Drupal core has been updated from %previous_version to %update_version',
[
Loading