This commit is contained in:
Andras Bacsai
2023-05-26 13:52:40 +02:00
parent b85a0c4d09
commit 97b336bff4

View File

@@ -47,12 +47,15 @@ class InstanceAutoUpdateJob implements ShouldQueue, ShouldBeUnique
$instance_settings = InstanceSettings::get(); $instance_settings = InstanceSettings::get();
if (!$instance_settings->is_auto_update_enabled) { if (!$instance_settings->is_auto_update_enabled) {
$this->fail('Auto update is disabled'); $this->fail('Auto update is disabled');
return;
} }
if ($latest_version === $current_version) { if ($latest_version === $current_version) {
$this->fail("Already on latest version"); $this->fail("Already on latest version");
return;
} }
if (version_compare($latest_version, $current_version, '<')) { if (version_compare($latest_version, $current_version, '<')) {
$this->fail("Latest version is lower than current version?!"); $this->fail("Latest version is lower than current version?!");
return;
} }
} }
instant_remote_process([ instant_remote_process([
@@ -64,6 +67,7 @@ class InstanceAutoUpdateJob implements ShouldQueue, ShouldBeUnique
} catch (\Exception $e) { } catch (\Exception $e) {
Log::error($e->getMessage()); Log::error($e->getMessage());
$this->fail($e->getMessage()); $this->fail($e->getMessage());
return;
} }
} }
} }