fix: service deletion bug!

This commit is contained in:
Andras Bacsai committed 2024-01-17 15:48:01 +01:00
1 parent 1e158badfc
commit af01bc3e77
3 files changed
+11 -4

No files matched your search

+7 -2
View File
@@ -31,11 +31,16 @@ class DeleteResourceJob implements ShouldQueue, ShouldBeEncrypted
{
try {
$server = $this->resource->destination->server;
$this->resource->delete();
if (!$server->isFunctional()) {
$this->resource->forceDelete();
if ($this->resource->type() === 'service') {
ray('dispatching delete service');
DeleteService::dispatch($this->resource);
} else {
$this->resource->forceDelete();
}
return 'Server is not functional';
}
$this->resource->delete();
switch ($this->resource->type()) {
case 'application':
StopApplication::run($this->resource);