From fe872a59ca7b02b92574357db9538ed1713e8f8e Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Mon, 15 Apr 2024 11:11:58 +0200 Subject: [PATCH] fix: helper image only pulled if required, not every 10 mins --- app/Console/Kernel.php | 4 ++-- app/Jobs/ApplicationDeploymentJob.php | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 92cbf9c5c..89ec6feea 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -31,7 +31,7 @@ protected function schedule(Schedule $schedule): void $this->check_scheduled_backups($schedule); $this->check_resources($schedule); $this->check_scheduled_backups($schedule); - $this->pull_helper_image($schedule); + // $this->pull_helper_image($schedule); $this->check_scheduled_tasks($schedule); $schedule->command('uploads:clear')->everyTwoMinutes(); } else { @@ -46,7 +46,7 @@ protected function schedule(Schedule $schedule): void $this->instance_auto_update($schedule); $this->check_scheduled_backups($schedule); $this->check_resources($schedule); - $this->pull_helper_image($schedule); + // $this->pull_helper_image($schedule); $this->check_scheduled_tasks($schedule); $schedule->command('cleanup:database --yes')->daily(); diff --git a/app/Jobs/ApplicationDeploymentJob.php b/app/Jobs/ApplicationDeploymentJob.php index 5cc5c4fb5..d4650002f 100644 --- a/app/Jobs/ApplicationDeploymentJob.php +++ b/app/Jobs/ApplicationDeploymentJob.php @@ -902,6 +902,10 @@ private function prepare_builder_image() } $this->application_deployment_queue->addLogEntry("Preparing container with helper image: $helperImage."); $this->execute_remote_command( + [ + "command" => "docker pull -q {$helperImage}", + "hidden" => true + ], [ "command" => "docker rm -f {$this->deployment_uuid}", "ignore_errors" => true,