fix cleanup images for databases
This commit is contained in:
@@ -69,11 +69,21 @@ class DeleteResourceJob implements ShouldBeEncrypted, ShouldQueue
|
|||||||
}
|
}
|
||||||
if ($this->deleteConfigurations) {
|
if ($this->deleteConfigurations) {
|
||||||
$this->resource?->delete_configurations();
|
$this->resource?->delete_configurations();
|
||||||
|
ray('Iam am running now, Configurations should disapear right?');
|
||||||
}
|
}
|
||||||
|
|
||||||
$server = data_get($this->resource, 'server');
|
$isDatabase = $this->resource instanceof StandalonePostgresql
|
||||||
if ($this->deleteImages && $server) {
|
|| $this->resource instanceof StandaloneRedis
|
||||||
CleanupDocker::run($server, true); //this is run for DBs but it does not work for DBs
|
|| $this->resource instanceof StandaloneMongodb
|
||||||
|
|| $this->resource instanceof StandaloneMysql
|
||||||
|
|| $this->resource instanceof StandaloneMariadb
|
||||||
|
|| $this->resource instanceof StandaloneKeydb
|
||||||
|
|| $this->resource instanceof StandaloneDragonfly
|
||||||
|
|| $this->resource instanceof StandaloneClickhouse;
|
||||||
|
$server = data_get($this->resource, 'server') ?? data_get($this->resource, 'destination.server');
|
||||||
|
if (($this->deleteImages || $isDatabase) && $server) {
|
||||||
|
CleanupDocker::run($server, true);
|
||||||
|
ray('I am running now, images should disappear right?');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->deleteConnectedNetworks) {
|
if ($this->deleteConnectedNetworks) {
|
||||||
|
|||||||
Reference in New Issue
Block a user