Skip to content

Commit f5b15c5

Browse files
committed
adjust fail notifications
1 parent 50b8840 commit f5b15c5

File tree

3 files changed

+8
-13
lines changed

3 files changed

+8
-13
lines changed

app/Console/Commands/PerformUpdate.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,6 @@ public function handle(): int
3535
/** @var Site $site */
3636
$site = Site::findOrFail($this->input->getArgument('siteId'));
3737

38-
if (!$site->update_requirement_state) {
39-
$this->output->writeln('Update requirements not met, aborting!');
40-
41-
return Command::FAILURE;
42-
}
43-
4438
UpdateSite::dispatchSync(
4539
$site,
4640
$targetVersion

app/Console/Commands/QueueUpdates.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ public function handle(): int
3939
$this->output->writeln('Pushing update jobs');
4040

4141
$sites = Site::query()
42-
->where('update_requirement_state', '=', true)
4342
->where(
4443
'cms_version',
4544
'like',

app/Jobs/UpdateSite.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,6 @@ public function handle(): void
5151
return;
5252
}
5353

54-
if (!$healthResult->update_requirement_state) {
55-
Log::info("Site does not meet requirements, abort");
56-
57-
return;
58-
}
59-
6054
// Do not make a major version update
6155
$majorVersionCms = (int) $healthResult->cms_version;
6256
$majorTargetVersion = (int) $this->targetVersion;
@@ -67,6 +61,14 @@ public function handle(): void
6761
return;
6862
}
6963

64+
// Update is available, but let's check if the requirements are met
65+
if (!$healthResult->update_requirement_state) {
66+
throw new UpdateException(
67+
'verify',
68+
"Site does not meet requirements"
69+
);
70+
}
71+
7072
// Store pre-update response code
7173
$this->preUpdateCode = $this->site->getFrontendStatus();
7274

0 commit comments

Comments
 (0)