refactoring - remove unused code

This commit is contained in:
Saeed Vaziry
2024-03-06 20:33:33 +01:00
parent cfc0645002
commit 9d705592da
32 changed files with 3 additions and 442 deletions

View File

@ -3,7 +3,6 @@
namespace App\ServerTypes;
use App\Contracts\ServerType;
use App\Events\Broadcast;
use App\Models\Server;
use Closure;
@ -22,11 +21,6 @@ protected function progress(int $percentage, ?string $step = null): Closure
$this->server->progress = $percentage;
$this->server->progress_step = $step;
$this->server->save();
event(new Broadcast('server-installation-progress', [
'server' => $this->server,
'step' => $step,
'percentage' => $percentage,
]));
};
}
}

View File

@ -2,7 +2,6 @@
namespace App\ServerTypes;
use App\Events\Broadcast;
use App\Facades\Notifier;
use App\Jobs\Installation\Initialize;
use App\Jobs\Installation\InstallRequirements;
@ -64,11 +63,6 @@ public function install(): void
'status' => 'ready',
'progress' => 100,
]);
event(
new Broadcast('install-server-finished', [
'server' => $this->server,
])
);
Notifier::send($this->server, new ServerInstallationSucceed($this->server));
};
@ -77,11 +71,6 @@ public function install(): void
$this->server->update([
'status' => 'installation_failed',
]);
event(
new Broadcast('install-server-failed', [
'server' => $this->server,
])
);
Notifier::send($this->server, new ServerInstallationFailed($this->server));
Log::error('server-installation-error', [
'error' => (string) $e,

View File

@ -3,7 +3,6 @@
namespace App\ServerTypes;
use App\Enums\ServerStatus;
use App\Events\Broadcast;
use App\Facades\Notifier;
use App\Jobs\Installation\Initialize;
use App\Jobs\Installation\InstallCertbot;
@ -86,11 +85,6 @@ public function install(): void
'status' => ServerStatus::READY,
'progress' => 100,
]);
event(
new Broadcast('install-server-finished', [
'server' => $this->server,
])
);
Notifier::send($this->server, new ServerInstallationSucceed($this->server));
};
@ -99,11 +93,6 @@ public function install(): void
$this->server->update([
'status' => 'installation_failed',
]);
event(
new Broadcast('install-server-failed', [
'server' => $this->server,
])
);
Notifier::send($this->server, new ServerInstallationFailed($this->server));
Log::error('server-installation-error', [
'error' => (string) $e,