refactor: Remove unnecessary logging statements from UpdateCoolify
This commit is contained in:
parent
03aa440424
commit
e3e938c8eb
@ -5,7 +5,6 @@ namespace App\Actions\Server;
|
|||||||
use Lorisleiva\Actions\Concerns\AsAction;
|
use Lorisleiva\Actions\Concerns\AsAction;
|
||||||
use App\Models\InstanceSettings;
|
use App\Models\InstanceSettings;
|
||||||
use App\Models\Server;
|
use App\Models\Server;
|
||||||
use Illuminate\Support\Facades\Log;
|
|
||||||
|
|
||||||
class UpdateCoolify
|
class UpdateCoolify
|
||||||
{
|
{
|
||||||
@ -28,19 +27,15 @@ class UpdateCoolify
|
|||||||
$this->currentVersion = config('version');
|
$this->currentVersion = config('version');
|
||||||
if (!$manual_update) {
|
if (!$manual_update) {
|
||||||
if (!$settings->is_auto_update_enabled) {
|
if (!$settings->is_auto_update_enabled) {
|
||||||
Log::debug('Auto update is disabled');
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ($this->latestVersion === $this->currentVersion) {
|
if ($this->latestVersion === $this->currentVersion) {
|
||||||
Log::debug('Already on latest version');
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (version_compare($this->latestVersion, $this->currentVersion, '<')) {
|
if (version_compare($this->latestVersion, $this->currentVersion, '<')) {
|
||||||
Log::debug('Latest version is lower than current version?!');
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Log::info("Updating from {$this->currentVersion} -> {$this->latestVersion}");
|
|
||||||
$this->update();
|
$this->update();
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
ray('InstanceAutoUpdateJob failed');
|
ray('InstanceAutoUpdateJob failed');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user