From 3583e552f1dbc256a91d89832f1c0c9282559a52 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Wed, 29 Nov 2023 15:23:03 +0100 Subject: [PATCH] Commented out cleanup_ssh() function --- app/Console/Commands/Init.php | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/app/Console/Commands/Init.php b/app/Console/Commands/Init.php index 862fb7625..8f55d2e5c 100644 --- a/app/Console/Commands/Init.php +++ b/app/Console/Commands/Init.php @@ -32,7 +32,7 @@ class Init extends Command if ($cleanup) { echo "Running cleanup\n"; $this->cleanup_stucked_resources(); - $this->cleanup_ssh(); + // $this->cleanup_ssh(); } $this->cleanup_in_progress_application_deployments(); $this->cleanup_stucked_helper_containers(); @@ -63,21 +63,23 @@ class Init extends Command echo "Error in alive: {$e->getMessage()}\n"; } } - private function cleanup_ssh() - { - try { - $files = Storage::allFiles('ssh/keys'); - foreach ($files as $file) { - Storage::delete($file); - } - $files = Storage::allFiles('ssh/mux'); - foreach ($files as $file) { - Storage::delete($file); - } - } catch (\Throwable $e) { - echo "Error in cleaning ssh: {$e->getMessage()}\n"; - } - } + // private function cleanup_ssh() + // { + + // TODO: it will cleanup id.root@host.docker.internal + // try { + // $files = Storage::allFiles('ssh/keys'); + // foreach ($files as $file) { + // Storage::delete($file); + // } + // $files = Storage::allFiles('ssh/mux'); + // foreach ($files as $file) { + // Storage::delete($file); + // } + // } catch (\Throwable $e) { + // echo "Error in cleaning ssh: {$e->getMessage()}\n"; + // } + // } private function cleanup_in_progress_application_deployments() { // Cleanup any failed deployments