fix: delete resource if there was an error

fix: do not refresh on containerStatusJob (db view)
This commit is contained in:
Andras Bacsai 2023-10-14 17:26:16 +02:00
parent 0ef386b4a8
commit bc3e59e4ef
5 changed files with 5 additions and 6 deletions

View File

@ -6,7 +6,6 @@
use App\Actions\Database\StartRedis;
use App\Actions\Database\StopDatabase;
use App\Jobs\ContainerStatusJob;
use App\Notifications\Application\StatusChanged;
use Livewire\Component;
class Heading extends Component
@ -29,7 +28,6 @@ public function check_status()
{
dispatch_sync(new ContainerStatusJob($this->database->destination->server));
$this->database->refresh();
$this->emit('refresh');
}
public function mount()

View File

@ -45,10 +45,11 @@ public function handle()
StopService::run($this->resource);
break;
}
$this->resource->delete();
} catch (\Throwable $e) {
send_internal_notification('ContainerStoppingJob failed with: ' . $e->getMessage());
throw $e;
} finally {
$this->resource->delete();
}
}
}

View File

@ -7,7 +7,7 @@
// The release version of your application
// Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD'))
'release' => '4.0.0-beta.84',
'release' => '4.0.0-beta.85',
// When left empty or `null` the Laravel environment will be used
'environment' => config('app.env'),

View File

@ -1,3 +1,3 @@
<?php
return '4.0.0-beta.84';
return '4.0.0-beta.85';

View File

@ -4,7 +4,7 @@
"version": "3.12.36"
},
"v4": {
"version": "4.0.0-beta.84"
"version": "4.0.0-beta.85"
}
}
}