fix: handle duplicate error instead of sql error

fix: set fqdns to null if you delete an app or a serviceapp
fix: make stucked resources a separate command
This commit is contained in:
Andras Bacsai
2024-01-30 09:48:51 +01:00
parent 3ae9501814
commit 9667cd4a7a
9 changed files with 316 additions and 297 deletions

View File

@@ -11,6 +11,9 @@ class StopApplication
public function handle(Application $application)
{
$server = $application->destination->server;
if (!$server->isFunctional()) {
return 'Server is not functional';
}
if ($server->isSwarm()) {
instant_remote_process(["docker stack rm {$application->uuid}" ], $server);
} else {

View File

@@ -17,6 +17,9 @@ class StopDatabase
public function handle(StandaloneRedis|StandalonePostgresql|StandaloneMongodb|StandaloneMysql|StandaloneMariadb $database)
{
$server = $database->destination->server;
if (!$server->isFunctional()) {
return 'Server is not functional';
}
instant_remote_process(
["docker rm -f {$database->uuid}"],
$server