refactor(actions): standardize method naming for network and configuration deletion across application and service classes

This commit is contained in:
Andras Bacsai
2025-04-30 18:30:43 +02:00
parent ed0961e0dc
commit 019ed43448
24 changed files with 123 additions and 117 deletions

View File

@@ -30,7 +30,7 @@ class StopApplication
$application->stopContainers($containersToStop, $server);
if ($application->build_pack === 'dockercompose') {
$application->delete_connected_networks($application->uuid);
$application->deleteConnectedNetworks();
}
if ($dockerCleanup) {

View File

@@ -48,7 +48,7 @@ class DeleteService
}
if ($deleteConnectedNetworks) {
$service->delete_connected_networks($service->uuid);
$service->deleteConnectedNetworks();
}
instant_remote_process(["docker rm -f $service->uuid"], $server, throwError: false);
@@ -56,7 +56,7 @@ class DeleteService
throw new \Exception($e->getMessage());
} finally {
if ($deleteConfigurations) {
$service->delete_configurations();
$service->deleteConfigurations();
}
foreach ($service->applications()->get() as $application) {
$application->forceDelete();

View File

@@ -24,7 +24,7 @@ class StopService
$service->stopContainers($containersToStop, $server);
if ($isDeleteOperation) {
$service->delete_connected_networks($service->uuid);
$service->deleteConnectedNetworks();
if ($dockerCleanup) {
CleanupDocker::dispatch($server, true);
}