This commit is contained in:
Andras Bacsai
2023-05-31 14:57:42 +02:00
parent 25870dadd8
commit 8991de2610
8 changed files with 20 additions and 19 deletions

View File

@@ -269,7 +269,6 @@ COPY --from=$this->build_image_name /app/{$this->application->publish_directory}
private function next(string $status)
{
ray($this->application_deployment_queue->status, Str::of($this->application_deployment_queue->status)->startsWith('cancelled'));
if (!Str::of($this->application_deployment_queue->status)->startsWith('cancelled')) {
$this->application_deployment_queue->update([
'status' => $status,
@@ -522,7 +521,7 @@ COPY --from=$this->build_image_name /app/{$this->application->publish_directory}
} else {
$commandText = collect($command)->implode("\n");
}
ray('Executing command', $commandText);
ray('Executing command: ' . $commandText);
$this->activity->properties = $this->activity->properties->merge([
'command' => $commandText,
]);
@@ -623,7 +622,6 @@ COPY --from=$this->build_image_name /app/{$this->application->publish_directory}
$nixpacks_command .= " --install-cmd \"{$this->application->install_command}\"";
}
$nixpacks_command .= " {$this->workdir}";
ray('Build command: ' . $nixpacks_command);
return $this->execute_in_builder($nixpacks_command);
}
private function stop_running_container()

View File

@@ -34,9 +34,8 @@ class ContainerStatusJob implements ShouldQueue, ShouldBeUnique
public function handle(): void
{
try {
ray('running ContainerStatusJob', $this->container_name, $this->pull_request_id);
$status = get_container_status(server: $this->application->destination->server, container_id: $this->container_name, throwError: false);
ray('ContainerStatusJob', $status);
ray('Container ' . $this->container_name . ' statuus is ' . $status);
if ($this->pull_request_id) {
$preview = ApplicationPreview::findPreviewByApplicationAndPullId($this->application->id, $this->pull_request_id);
$preview->status = $status;