fix: helper image only pulled if required, not every 10 mins
This commit is contained in:
		@@ -31,7 +31,7 @@ class Kernel extends ConsoleKernel
 | 
				
			|||||||
            $this->check_scheduled_backups($schedule);
 | 
					            $this->check_scheduled_backups($schedule);
 | 
				
			||||||
            $this->check_resources($schedule);
 | 
					            $this->check_resources($schedule);
 | 
				
			||||||
            $this->check_scheduled_backups($schedule);
 | 
					            $this->check_scheduled_backups($schedule);
 | 
				
			||||||
            $this->pull_helper_image($schedule);
 | 
					            // $this->pull_helper_image($schedule);
 | 
				
			||||||
            $this->check_scheduled_tasks($schedule);
 | 
					            $this->check_scheduled_tasks($schedule);
 | 
				
			||||||
            $schedule->command('uploads:clear')->everyTwoMinutes();
 | 
					            $schedule->command('uploads:clear')->everyTwoMinutes();
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
@@ -46,7 +46,7 @@ class Kernel extends ConsoleKernel
 | 
				
			|||||||
            $this->instance_auto_update($schedule);
 | 
					            $this->instance_auto_update($schedule);
 | 
				
			||||||
            $this->check_scheduled_backups($schedule);
 | 
					            $this->check_scheduled_backups($schedule);
 | 
				
			||||||
            $this->check_resources($schedule);
 | 
					            $this->check_resources($schedule);
 | 
				
			||||||
            $this->pull_helper_image($schedule);
 | 
					            // $this->pull_helper_image($schedule);
 | 
				
			||||||
            $this->check_scheduled_tasks($schedule);
 | 
					            $this->check_scheduled_tasks($schedule);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            $schedule->command('cleanup:database --yes')->daily();
 | 
					            $schedule->command('cleanup:database --yes')->daily();
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -902,6 +902,10 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
        $this->application_deployment_queue->addLogEntry("Preparing container with helper image: $helperImage.");
 | 
					        $this->application_deployment_queue->addLogEntry("Preparing container with helper image: $helperImage.");
 | 
				
			||||||
        $this->execute_remote_command(
 | 
					        $this->execute_remote_command(
 | 
				
			||||||
 | 
					            [
 | 
				
			||||||
 | 
					                "command" => "docker pull -q {$helperImage}",
 | 
				
			||||||
 | 
					                "hidden" => true
 | 
				
			||||||
 | 
					            ],
 | 
				
			||||||
            [
 | 
					            [
 | 
				
			||||||
                "command" => "docker rm -f {$this->deployment_uuid}",
 | 
					                "command" => "docker rm -f {$this->deployment_uuid}",
 | 
				
			||||||
                "ignore_errors" => true,
 | 
					                "ignore_errors" => true,
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user