feat: cleanup sentinel on server deletion

fix: Sentinel should not be enabled on build servers
This commit is contained in:
Andras Bacsai committed 2024-10-17 11:21:43 +02:00
1 parent b58ff07832
commit 4c95647b96
8 files changed
+27 -8

No files matched your search

+2 -1
View File
@@ -2,6 +2,7 @@
namespace App\Livewire\Server;
use App\Actions\Server\RemoveServer;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Hash;
@@ -27,7 +28,7 @@ class Delete extends Component
return;
}
$this->server->delete();
RemoveServer::run($this->server);
return redirect()->route('server.index');
} catch (\Throwable $e) {
+1 -1
View File
@@ -157,7 +157,7 @@ class Form extends Component
StopSentinel::dispatch($this->server);
$this->server->settings->is_metrics_enabled = false;
$this->server->settings->save();
$this->server->sentinelUpdateAt(isReset: true);
$this->server->sentinelHeartbeat(isReset: true);
} else {
StartSentinel::run($this->server);
}